Live data from Hacker News

The first stable release of a memory safe sudo implementation

memorysafety.org

51–60 of 260 posts

Re: The first stable release of a memory safe sudo implementation

#51
post #2

I remember a couple of years ago a root exploit in Sudo that was the result of failing to check for a sentinel value, thinking “that is a bug that wouldn’t happen in Rust, even though it isn’t related to memory safety!” Rust enums are sum types, and imho are one of the few unambiguously good language feature ideas. I miss them any time I use a language where they are not built in. F# is another nice language where th…

> Rust enums are sum types, I wouldn't mind so much if they just called them "sum types" or "tagged unions", or even some other new name. Reusing the existing name "enum" from other languages, but differently from the way all those other languages have used it for 45 gorram years, is freaking maddening.

That's inherited from OCaml I think.

https://www.ocamlwiki.com/wiki/Enum

Re: The first stable release of a memory safe sudo implementation

#52
post #20

Earlier quoted context omitted.

One feature they didn't mention they left out was the ability to run `make me a sandwich` ( https://github.com/sudo-project/sudo/blob/main/Makefile.in#L... )

Is that a Slashdot reference?

Old XKCD joke (maybe coming from an older joke)...

https://xkcd.com/149/

Re: The first stable release of a memory safe sudo implementation

#54

I'm assuming this project's aim is to replace sudo, in which case hand-waving away "Leaving out less commonly used features" is a bit worrying. What are these features? How uncommonly are they used? In which way will it fail if a configuration uses those features? Edit: Looks like their github readme outlines some of these limitations, https://github.com/memorysafety/sudo-rs#differences-from-ori...

One of the features I use in some (larger) environments, which isn't on the roadmap or implemented is LDAP support in sudo-rs. Using the regular sudo, this allows you to manage the sudo permissions for the entire network from the central LDAP configuration, and even make rules that are time/host/user/command limited in a central location with no chance of simple syntax-errors wiping out your entire configuration, just that single rule is being ignored in this case.

Re: The first stable release of a memory safe sudo implementation

#55

Earlier quoted context omitted.

Is that a Slashdot reference?

Old XKCD joke (maybe coming from an older joke)... https://xkcd.com/149/

That XKCD joke was all over the Internet in 2006. Now get off my lawn.

Re: The first stable release of a memory safe sudo implementation

#56

> Apache-2.0+MIT vs GPL-2.0 So, you may get a memory-safe su/sudo-rs, but those who distribute it in a binary form won't be obliged to show you the source code it was built from (potentially including some modifications).

Is that really bad? You are free to not use such distributions. Regarding security, malicious actor could show you a different source code from what he distributes in a binary form. GPL or no GPL.

> Regarding security, malicious actor could show you a different source code from what he distributes in a binary form.

That's why hashes are published by distributors and checked by package managers, right?

Re: The first stable release of a memory safe sudo implementation

#57
post #55

Earlier quoted context omitted.

Old XKCD joke (maybe coming from an older joke)... https://xkcd.com/149/

That XKCD joke was all over the Internet in 2006. Now get off my lawn.

Well, that comic is from 2006 so not that far away :P ;)

Re: The first stable release of a memory safe sudo implementation

#58
post #17

Earlier quoted context omitted.

In general a lot of "[GNU tool] but in rust" projects do seem to come very close to violating the GPL, especially in spirit.

In what sense? It is completely in the spirit of the GPL to reimplement a GPL tool from scratch with the same behavior and a different license. After all, that's how the free Unixes came about (though admittedly those were BSD licensed typically).

Kinda? Historically there were indeed concerns about reimplementation and copyright. One of the ways that the GNU Project tried to fight claims was to reimplement the tools using dynamically-allocated memory (instead of Unix's traditional fixed-size buffers) to make sure the implementation was sufficiently different. Other ways were making the implementation Posixly correct, adding internationalization or trying to pick different approaches (like using more modern algorithms for sorting). The GNU tools were better, not just direct ports, and that's why it was common to install them in systems like Solaris or HP-UX.

Re: The first stable release of a memory safe sudo implementation

#59
post #31

IIRC, all the recent sudo vulns are logic errors, not memory safety. I mean, rewrite away but let's not pretend that there couldn't be some new bug introduced due to a misunderstanding of how something works or just a plain old mistake.

In the same way a new memory bug could be introduced to the original sudo. Shrinking the attack surface with static checks seems like a better deal in the long run.

Re: The first stable release of a memory safe sudo implementation

#60
As one of the original creators of sudo (https://en.wikipedia.org/wiki/Sudo) I've witnessed it getting nearly totally rewritten and then incrementally bug-fixed over the last 43 years. It must take the prize for the UNIX command most highly-scrutinized for security flaws. Flaws which have been identified and fixed.

Thousands of developers and security experts have gone over it. So part of me wonders - how is it possible for a single dev team to totally reimplement it without unknowingly introducing at least a bug or two? Is there something to this Rust language which magically eliminates all chances of any bug being introduced?

Post reply on HN