Live data from Hacker News

🥺: the best sudo replacement

xeiaso.net

411–420 of 559 posts

Re: 🥺: the best sudo replacement

#412

[flagged]

Normally this is just tangentially related and not for Hacker News but I feel this time it needs a bit of attention. My brain melted in the first minutes trying to read this article. I honestly just couldn't. It feels like I'm reading a mentally ill extremelly schizophrenic write-up on the recent sudo vulnerabilities, makes me lose sanity. Has anyone actually managed to read this? How is this on the front page? (Not…

[deleted]

Re: 🥺: the best sudo replacement

#413

I feel obliged to mention doas[1], which is a sudo alternative from openBSD. It is written in c, but tries to be smaller and easier to configure. I am not qualified to vouch for or against it, but it is interesting. 1: https://man.openbsd.org/doas

The primary author, Ted Unangst, has a couple of blog posts describing the inception of doas, and its intended typical use patterns:

https://flak.tedunangst.com/post/doas

https://flak.tedunangst.com/post/doas-mastery

Re: 🥺: the best sudo replacement

#414

Earlier quoted context omitted.

I've run into a service where having a password longer than 15 characters _truncates_ it but the password change dialog does not so it's stuck in limbo.

One site I went to lowercased my password before storing it unencrypted in the DB, which I only discovered after failing to log in and asking for a password reset mail, so it helpfully emailed me my clear text lowercased password.

I worked at a place that did this, case-insensitive passwords and all. The worst part? They had unencrypted production database backups on all of their dev laptops, the majority of which left the premises after every night. I couldn't get a figure of how many laptops were lost but statistically speaking there had to have been at least 3 lost laptops with unencrypted production database backups per year using industry statistics.

Eventually I convinced leadership to invest in basic security after conservative but still embarrassingly high 6-to-7-figure estimates of annual loss expectancy that only took a measly 5 figures a year to eliminate 75% of the risk, but the company only went around to it a long while after I left the place.

Re: 🥺: the best sudo replacement

#415

What was the point of this post? No, this program isn't a replacement for sudo; it's closer to a reimplementation of su. The post links to 3 CVEs and talks about Rust, but only one of the CVEs was a memory safety bug, the others are a logic error and a race condition, neither of which are protected by Rust (sadly).

[dead]

Re: 🥺: the best sudo replacement

#416
post #388
post #137

Earlier quoted context omitted.

Any program running as your user on your personal machine can trivially gain root privileges, by dropping a program called "sudo" in your personal PATH, putting a "sudo" command in your .bashrc, man-in-the-middle a shell (how do you know that last command actually completed?), or hijacking any of the graphical programs that trivially ask you for your UNIX password to do anything (Discord/Slack/... updater, Steam, ...…

I’m guessing something like `chown root ~/.bash*` would prevent that, if all the folders in your PATH are owned by root.

You can close some gaps, but at the end of the day you can't expect that you'll run malicious code but it won't do this or that. For example the X server allows any client to listen for key events or hook into other windows.

Re: 🥺: the best sudo replacement

#417
post #408

Earlier quoted context omitted.

In the enterprise key management can become a bitch really quickly. Good luck updating 10.000 servers every time an admin leaves. For them ssh certificates are much better because you can simply revoke them, and new certs don't have to be added to each server. At home I still use keys though, but as an enterprise admin I see the issues. Even at home it's kinda annoying having to add a new yubikey to 20 servers.

You could use AuthorizedKeysCommand or some other method to manage your keys in one central place.

You can, but you still need to set up a secure infrastructure to manage all the requests going back and forth.

And most enterprises already have a completely functional and secured PKI, usually with the whole HSM deal and everything. It's plug and play and works with your existing infra.

Re: 🥺: the best sudo replacement

#418

What was the point of this post? No, this program isn't a replacement for sudo; it's closer to a reimplementation of su. The post links to 3 CVEs and talks about Rust, but only one of the CVEs was a memory safety bug, the others are a logic error and a race condition, neither of which are protected by Rust (sadly).

I thought safe rust did prevent race conditions by preventing simultaneous write access to data except behind a Mutex or similar guard.

Re: 🥺: the best sudo replacement

#419

What was the point of this post? No, this program isn't a replacement for sudo; it's closer to a reimplementation of su. The post links to 3 CVEs and talks about Rust, but only one of the CVEs was a memory safety bug, the others are a logic error and a race condition, neither of which are protected by Rust (sadly).

I thought safe rust did prevent race conditions by preventing simultaneous write access to data except behind a Mutex or similar guard.

That's a memory safety issue that caused by a race condition. Rust prevents memory safety issues, but not race conditions. The race condition in one of the CVEs is in the filesystem, not in sudo.

Re: 🥺: the best sudo replacement

#420

What was the point of this post? No, this program isn't a replacement for sudo; it's closer to a reimplementation of su. The post links to 3 CVEs and talks about Rust, but only one of the CVEs was a memory safety bug, the others are a logic error and a race condition, neither of which are protected by Rust (sadly).

I thought safe rust did prevent race conditions by preventing simultaneous write access to data except behind a Mutex or similar guard.

Rust prevents data races which are only one kind of race condition.
Post reply on HN