Live data from Hacker News

Memory-safe sudo to become the default in Ubuntu

trifectatech.org

51–60 of 282 posts

Re: Memory-safe sudo to become the default in Ubuntu

#51
post #40
post #25

Earlier quoted context omitted.

True, CVE-2021-4034 comes to mind as a recent example (exploiting zero-length argv)

How is that any different than a daemon that has a parser error in its message handler, except that the daemon could be misconfigured to listen on a network socket? The original unix process abstraction was extremely simple; the entire spec is a few pages. The problem is that Linux keeps adding more and more levels of Rube Goldberg machine to its security model, so now literally no one understands how a default minim…

> How is that any different than a daemon that has a parser error in its message handler

The non-daemon has to parse just as much in addition to making itself secure. Actually it needs to parse more things in more complex ways.

Re: Memory-safe sudo to become the default in Ubuntu

#52

Seems like the trifecta group is /just/ about migrating tools to rust? Am I understanding that right? I don't have a problem with it, specifically. Seems odd that they don't advertise it, though.

[flagged]

It's not religious. Memory safety is a thing. If by politics you mean the government: they only got started recommending memory safe languages once it became clear that foreign actors were going to keep exploiting C / C++ vulnerabilities.

https://www.theregister.com/2024/11/08/the_us_government_wan...

Re: Memory-safe sudo to become the default in Ubuntu

#53
post #8
post #3

Earlier quoted context omitted.

Sudo had quite a few problems with security, partially because of this doas was developed for BSD. Some problems come from the huge amount of features(ldap, easter eggs, ...). sudo-rs reduces the problems by not implementing those features.

> Some problems come from the huge amount of features(ldap, easter eggs, ...). sudo-rs reduces the problems by not implementing those features. This makes me wonder: 1) Would a hypothetical "sudo-lite" with these features removed lead to better security without a rewrite? 2) If these features are useful in the real world, will a Rust rewrite of sudo inevitably gain these features over time and end up with similar pro…

It can't end up with similar problems, due to the memory safety guarantee.

That's not to say that it won't create other ones.

Re: Memory-safe sudo to become the default in Ubuntu

#54
post #46
post #24

Earlier quoted context omitted.

We've accepted it at this point, but I wonder if the religious element of GNU tools and free software in general was as contentious way back when.

GNU sort of lost its way around GPLv3 (it gives cloud services a free pass, but not locally run software, which is the opposite of letting users control what their computer does). That killed most of the “user freedom” enthusiasm of the early days. These days, there’s the AGPL, but that’s mostly used like the BSL (“if you want to use AGPL in production, pay us”), than for bootstrapping freedom-respecting compute envi…

What kind of free pass would you want to give to locally run software?

Can't you already do anything you want to GPL code locally?

Re: Memory-safe sudo to become the default in Ubuntu

#55
post #47

How does sudo-rs compare to run0? https://news.ycombinator.com/item?id=40205714

A trivial Google search answers that. run0 requires systemd-type OS.

Given that Ubuntu uses systemd like the vast majority of Linux systems nowadays, how does sudo-rs differ from run0?

Re: Memory-safe sudo to become the default in Ubuntu

#56

doas is a much simpler (and therefore better) alternative.

doas is not a compatible drop-in replacement for existing users.

I wonder if there’s one that hardcodes a simple policy like “members of the wheel group can run any command with a password, and a 5 minute timeout”, but is also sudo command line compatible.

That’s what 99% of distros default to, and it’s simple.

Re: Memory-safe sudo to become the default in Ubuntu

#57

Earlier quoted context omitted.

A trivial Google search answers that. run0 requires systemd-type OS.

Given that Ubuntu uses systemd like the vast majority of Linux systems nowadays, how does sudo-rs differ from run0?

You might not have a systemd instance inside a container, but you still might want to switch user IDs there.

Re: Memory-safe sudo to become the default in Ubuntu

#58

Earlier quoted context omitted.

Being a setuid binary means that sudo also suffers from attacks where an attacker runs `sudo ./malware` and then convinces the user to authenticate. Depending on how sudo authenticates phishing attacks or password reuse from another breach can be used to escalate privileges.

Those will also have to be fixed/considered, but do not detract from the contribution of removing memory safety bugs which may enable exploits.

This is a case of doubling down on bad design. To me it's wasted effort preventing theoretical bugs in niche setups.

Re: Memory-safe sudo to become the default in Ubuntu

#59
post #34

Earlier quoted context omitted.

A little while ago I realized with a start that it's been years since I've heard anyone angrily insist on calling it "GNU/Linux", when that was constant background noise during the Slashdot era. One of those old fights that just faded away, I guess.

Oh yeah, I got to meet Stallman at a book signing when I was like 17, and like an idiot happened to wear a "Linux" shirt. I genuinely hadn't thought of this point of contention beforehand, but oof he did not care for that.

[deleted]

Re: Memory-safe sudo to become the default in Ubuntu

#60

Earlier quoted context omitted.

A trivial Google search answers that. run0 requires systemd-type OS.

Given that Ubuntu uses systemd like the vast majority of Linux systems nowadays, how does sudo-rs differ from run0?

sudo-rs doesn’t gratuitously require a root privilege daemon that regularly ships filesystem destruction and remote unauthenticated arbitrary code execution bugs.

If your bar is “I’ll tolerate such crap”, you may as well run your desktop session as root.

Post reply on HN