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.
The first stable release of a memory safe sudo implementation
51–60 of 260 posts
Re: The first stable release of a memory safe sudo implementation
#52Earlier 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?
Re: The first stable release of a memory safe sudo implementation
#53Re: The first stable release of a memory safe sudo implementation
#54I'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...
Re: The first stable release of a memory safe sudo implementation
#55Re: 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.
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
#57Re: The first stable release of a memory safe sudo implementation
#58Earlier 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).
Re: The first stable release of a memory safe sudo implementation
#59IIRC, 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.
Re: The first stable release of a memory safe sudo implementation
#60Thousands 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?