Live data from Hacker News

Memory-safe sudo to become the default in Ubuntu

trifectatech.org

21–30 of 282 posts

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

#21
post #18

Earlier quoted context omitted.

[flagged]

> The religious element of rust programmers Yeah. I too, hate the Rust Evangelically Orthodox Later Day Christians. Oh, wait... You're serious. What is religious about rewriting tools in Rust? Isn't that what most programmers do for fun and learning? Is it any more religious than worshiping Alan Kay or Dijkstra? > It makes me wonder how much is motivated by stuff other than what’s actually the best outcome. Looks in…

[dead]

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

#22
post #5
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.

Removing LDAP is a huge problem for the more important sudo deployments though: centralized management of permissions is kind of a vital function.

Debian is currently in the process of dropping the direct LDAP support in sudo, in favor of sssd. From sudo's NEWS.Debian.gz:

> In practice, there are few installations that use sudo-ldap. Most installations that use LDAP as a directory service and sudo have now opted for sssd, sssd-ldap and libsss-sudo.

> The Debian sudo team recommends the use of libsss-sudo for new installations and the migration of existing installations from sudo-ldap to libsss-sudo and sssd.

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

#23

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]

Memory safety is strictly a good thing, regardless of motivations.

But I'm aware that some people are frightened of new languages and paradigms especially if they're 'harder' than what they're used to.

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

#24

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]

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.

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

#25
post #15

Earlier quoted context omitted.

A bug in a daemon-based sudo alternative would surely also result in privilege escalation? I think the main benefit of eliminating setuid binaries is that you can forbid them system-wide (e.g. via mount flags), as a hardening measure.

There's value in always starting processes from a known-secure environment rather than attempting to transform a user's arbitrary environment into a secure one.

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

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

#26
post #8

Earlier quoted context omitted.

> 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…

> 1) Would a hypothetical "sudo-lite" with these features removed lead to better security without a rewrite? OpenBSD did this with their doas utility: * https://en.wikipedia.org/wiki/Doas

"without a rewrite" means cutting down the existing code. A completely different program goes into the same category as "rewrite".

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

#27
post #10

I am not sure if memory-safety is the biggest issue in sudo design. I find the fact that it is a setuid binary a much bigger issue because a bug can possible result in privilege escalation. I found an alternative implementation that doesn't rely in being a setuid binary like systemd-run0 much more interesting from a security perspective, but I am no security expert.

Right, but now the vector for privilege escalation will have to be a logic bug in memory-safe sudo instead of either a memory corruption (see CVE-2021-3156) or a logic bug. It’s hard not to see this as a major improvement.

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.

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

#28
post #24

Earlier quoted context omitted.

[flagged]

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.

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.

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

#29
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.

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.

That's true. I find myself still saying GNU/Linux where it's relevant (e.g. when referring to the userland, or a compatible userland) but it's not as contentious as it used to be, which is a nice breath.

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

#30

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]

> The religious element

It is only "religious" if you think it in such a way.

I'd say the amount of skepticism (rather than valid criticism) has been no less than enthusiam in the community.

As the saying goes, there are two kinds of languages...

Post reply on HN