Live data from Hacker News

Memory-safe sudo to become the default in Ubuntu

trifectatech.org

101–110 of 282 posts

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

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

Rust version of sudo had lots of ridiculous logic bugs. I do not see the improvement.

Do you have an example of the logic bugs you're referring to?

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

#102
post #75

Earlier quoted context omitted.

What should you do instead?

Design the system so that you do not need users to escalate to root. Find each use case where a user may want to use sudo and then come up with an alternate way to accomplish that action from a regular account.

We have that, it's called android.

Anybody who finds themselves using sudo is already well off the beaten path, by their own choice. There's nothing wrong with that.

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

#104

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 uses setuid.

run0 does not (and instead relies on systemd).

---

To answer your next question: setuid, while historic, is a bit weird, and is disabled in some environments, e.g. NoNewPrivileges.

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

#105
post #89
post #43

Earlier quoted context omitted.

> What is religious about rewriting tools in Rust? "Religious" isn't being used to refer to people rewriting tools in Rust. It's used to refer to people zealously commenting on message boards that every single tool ever built should be rewritten in Rust, and if you aren't rewriting your tool in Rust, you're an idiot.

> It's used to refer to people zealously commenting on message boards that every single tool ever built should be rewritten in Rust. Ok, but between me, GP and the article, who said that? Where are the Rabid RIIR fans? And before you misquote me, I said, why wouldn't you rewrite stuff in Rust, if the status quo is ridden with bugs, and safety issues? And why shouldn't a Linux distro switch to it if they desire.

So sudo is ridden with bugs and safety issues, as opposed to the Rust alternative? I came across a lot of ridiculously absurd logic bugs in the Rust version. Maybe you can still see GitHub Issues.

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

#106

Earlier quoted context omitted.

Rust version of sudo had lots of ridiculous logic bugs. I do not see the improvement.

Do you have an example of the logic bugs you're referring to?

I am pretty sure it is around here somewhere: https://github.com/trifectatechfoundation/sudo-rs/issues.

I apologize, I do not bookmark these issues, but maybe I should start doing that? In any case, you will find logic bugs which may raise the question "is it really worth the rewrite?".

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

#107

Earlier quoted context omitted.

[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.

>"But I'm aware that some people are frightened of new languages..."

I am not frightened. I program in many languages and have no problems grasping Rust concepts. However I find Rust way too opinionated and restricting for personal tastes. For business I can not see myself replacing C++ with Rust unless my paying clients specifically request it. So far not a single one had expressed any interest.

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

#108
post #89
post #43

Earlier quoted context omitted.

> What is religious about rewriting tools in Rust? "Religious" isn't being used to refer to people rewriting tools in Rust. It's used to refer to people zealously commenting on message boards that every single tool ever built should be rewritten in Rust, and if you aren't rewriting your tool in Rust, you're an idiot.

> It's used to refer to people zealously commenting on message boards that every single tool ever built should be rewritten in Rust. Ok, but between me, GP and the article, who said that? Where are the Rabid RIIR fans? And before you misquote me, I said, why wouldn't you rewrite stuff in Rust, if the status quo is ridden with bugs, and safety issues? And why shouldn't a Linux distro switch to it if they desire.

>Ok, but between me, GP and the article, who said that? Where are the Rabid RIIR fans?

The person you replied to said: "The religious element of rust programmers seems more extreme than other languages."

You interpreted that in a way that ended up with you asking "What is religious about rewriting tools in Rust".

I clarified that the typical way "religious element of rust programmers" is interpreted is not the act of rewriting tools, but the proselytizing about rust on message boards. I then gave an example of what that proselytizing typically looks like (which was not a claim that you said something like that).

That is the "religious element" being referred to. The proselytizing is the religious element, not the act of rewriting tools in Rust.

(The meme "Rust Evangelists" didn't manifest out of thin air because people hate memory safety or whatever -- it's because people are really, really passionate about Rust, and are vocal about that passion)

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

#109
post #75

Earlier quoted context omitted.

What should you do instead?

Design the system so that you do not need users to escalate to root. Find each use case where a user may want to use sudo and then come up with an alternate way to accomplish that action from a regular account.

That would just elevate each regular account to be a root account. There is no other way to make things like modifying files directly under / possible, or to change system configurations. You can lock everything down instead, then you have Android, but then you have certainly not enabled everything a user can do with sudo.

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

#110

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 is almost always the case that proposed changes to the technology stack of a project is intrinsically political. Unless every participant is equally proficient with the new thing as the old thing, then the proposed change is a de facto power play which will change the balance of power and experience and consequently usher in a reorganization.

This is why so many Linux developers resists the addition of Rust or C++.

Post reply on HN