Live data from Hacker News

Memory-safe sudo to become the default in Ubuntu

trifectatech.org

181–190 of 282 posts

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

#181
post #83

Earlier quoted context omitted.

Android uses the Linux Kernel, but iirc (correct me if I'm wrong), it doesn't come with the required application to make it Unix and hence is not the Linux operating system. That would mean it's only using the same kernel as the Linux operating system? Idk, just speculating to maybe get the thought process

> That would mean it's only using the same kernel as the Linux operating system? There's no "Linux operating system". Linux is the name of the kernel. Android is an operating system, GNU/Linux is, things like BusyBox/Linux are. They're all operating systems that use the Linux kernel.

Linux is a perfectly good operating system. If you're motivated enough, you can boot Linux straight into your software without any other dependencies at all. Linux operates the system just fine all by itself.

There's this weird definition of "operating system" which means "some sort of platform with a shell and little commands like cp, ls, etc.". That's just what POSIX tells people an operating system is, not the ultimate truth. It doesn't have to be that way.

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

#182
post #143

Earlier quoted context omitted.

> Ubuntu continuously updates itself without permission, killing apps and losing previous state. What? Is this some snap thing because apt sure as hell doesn't do this without you configuring it explicitly.

apt won't on its own, but if you're using the official images there's probably a service running that's calling it, probably for security patches etc. The bigger problem is upgrading packages deliberately but being surprised by the results. My team's current favorite is the upgrade process itself suddenly having new interactive prompts breaking our scripts.

> My team's current favorite is the upgrade process itself suddenly having new interactive prompts breaking our scripts.

This is how dpkg and apt have worked in Debian and Ubuntu pretty much since their inception. Look into debconf, dpkg and ucf configuration to learn how to integrate these with your automation. The mechanisms for this have existed for decades now and have not substantially changed in that time.

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

#183
post #121

> This move is part of a broader effort by Canonical to improve the resilience and maintainability of core system components. Sudo-rs is developed by the Trifecta Tech Foundation (TTF), a nonprofit organization that creates secure, open source building blocks for infrastructure software. Ubuntu continuously updates itself without permission, killing apps and losing previous state. You have the Javascript based Gnome…

> Ubuntu continuously updates itself without permission...

It does default to installing security updates automatically. However, this is completely configurable.

It isn't reasonable to have different default behaviour - otherwise the majority of users would be vulnerable from a security perspective.

If you want different behaviour, just configure it as you wish.

> The Ubuntu packages, drivers and kernel are laughably behind Debian and even further behind mainline.

This just isn't a reasonable description of reality.

Unless you're referring to an Ubuntu LTS, in which case, of course it is: that's the entire point of Ubuntu LTS, and Ubuntu users have the choice of using the six monthly non-LTS releases if they want more up-to-date packages, which Debian users do not have.

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

#184
post #121

> This move is part of a broader effort by Canonical to improve the resilience and maintainability of core system components. Sudo-rs is developed by the Trifecta Tech Foundation (TTF), a nonprofit organization that creates secure, open source building blocks for infrastructure software. Ubuntu continuously updates itself without permission, killing apps and losing previous state. You have the Javascript based Gnome…

Ubuntu continuously updates itself without permission, killing apps and losing previous state

I've never seen this happen and I've run Ubuntu in production for years. Apt does not auto-update unless it's configured for unattended upgrades — and both Debian and Ubuntu allow you to configure unattended upgrades in apt. And unattended upgrades via apt should not kill running user processes or cause data loss.

The Ubuntu packages, drivers, and kennel are laughably behind Debian.

This is just plain wrong — even for the steelman argument of Debian unstable or testing, which are not intended for general use. Debian unstable and testing are on kernel 6.12. Ubuntu 25.04 is on kernel 6.14.

Debian stable, meanwhile, is on 6.1. Ubuntu has the far more-recent kernel.

I don't know what you mean by "drivers" — there aren't separate drivers on Linux from the kernel; they're shipped in the kernel. Ubuntu's are also more recent than Debian, since the kernel version is more recent.

With respect to packages, obviously I can't check every package version, but e.g. coreutils in Ubuntu are on 9.5, released in March 2024; systemd on Ubuntu is a version released this year (and until last month Debian unstable and Ubuntu were identical); gcc is identical; etc. While Ubuntu occasionally lags Debian unstable, it's not by much.

If you compare to actual Debian stable, it's not even close. Debian stable is ancient.

And ultimately... Why are you using Debian unstable? It's called "unstable" for a reason. It receives basically no testing. Even the "testing" version is more stable, and that's not intended to be stable at all and doesn't necessarily receive security updates. Ubuntu is less-stable than Debian stable, but far more up-to-date; Debian testing is less-stable than Ubuntu... And usually still not even as up-to-date. Debian unstable is basically untested; if you want that you'd be better served by a rolling release distro like Arch where the packages are going to be way more up-to-date anyway.

The Debian wiki cautions against treating unstable or testing releases as general purpose, so I truly don't think even this steelman is viable. [1] In fact, they refuse to even call Debian unstable a "release" since there are no release practices associated with it and the code is effectively untested.

Ubuntu is nowhere near my favorite Linux distro, but claiming it's more out of date than Debian is just FUD.

Debian is very very stable — at least, Debian stable is — and people love it for that. But the tradeoff is that everything in it is ancient. If you want something that's like Debian, but more up-to-date but slightly less stable — that's Ubuntu. If you want a rolling release, that's Arch. (And of course, there are even more-different distros like NixOS or ostree-based ones; there's the Red Hat universe of RHEL and the closer-to-bleeding-edge Fedora; etc etc.) Using Debian unstable is either a magnanimous act of sacrifice in order to help test future Debian versions, or it's self-harm.

Personally if I wanted to use a Debian-derivative on the desktop, though, I'd probably use System76's PopOS, which is basically a cleaned-up Ubuntu with some nice GNOME extensions. I'm more curious in the future to try out ostree-based distros, though, like the various Fedora Atomic ones, since they have nice rollbacks without the user-facing complexity of NixOS.

1: https://wiki.debian.org/DebianUnstable

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

#185
post #52

Earlier quoted context omitted.

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

Trump administration also rescinded this I believe.

Not particularly. Some of this stuff started under the last Trump administration as well. We'll see.

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

#186

Earlier quoted context omitted.

Trump administration also rescinded this I believe.

Not particularly. Some of this stuff started under the last Trump administration as well. We'll see.

It's all sides of government.

Edit: all links now fixed.

____

(generated, but with references)

# U.S. government guidance on memory-safe languages

Here's the list of links to U.S. government documents recommending memory-safe programming languages for cybersecurity.

1. *White House ONCD - "Back to the Building Blocks" (Feb 2024)* - Encourages developers to use memory-safe languages like Rust, Python, Java, C#, Go, Swift to reduce vulnerabilities. - Link: https://bidenwhitehouse.archives.gov/wp-content/uploads/2024...

2. *CISA, NSA, FBI, and partners - "Memory Safe Roadmaps" (Dec 2023)* - Recommends memory-safe languages (C#, Go, Java, Rust, Ruby, Swift) and roadmaps to eliminate memory issues. - Link: https://www.cisa.gov/resources-tools/resources/case-memory-s...

3. *NSA - "Software Memory Safety" (Nov 2022)* - Advises using memory-safe languages like C#, Go, Java, Ruby, Swift to avoid C/C++ vulnerabilities. - Link: https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI...

4. *CISA - "Urgent Need for Memory Safety" (Sep 2023, updated Dec 2023)* - Promotes memory-safe languages as part of the Secure by Design campaign. - Link: https://www.cisa.gov/news-events/news/urgent-need-memory-saf...

5. *White House press release - "Future Software Should Be Memory Safe" (Feb 2024)* - Calls for memory-safe languages to reduce cyberattack surfaces. - Link: https://bidenwhitehouse.archives.gov/oncd/briefing-room/2024...

6. *NIST - "Safer Languages" (updated Oct 2022)* - Highlights memory-safe languages like Rust and Ada to prevent common vulnerabilities. - Link: https://www.nist.gov/itl/ssd/software-quality-group/safer-la...

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

#187
post #52

Earlier quoted context omitted.

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

Why is HN downmodding this? We're programmers, surely we all agree memory safety is a thing? Infosec people surely all agree that foreign actors have been exploiting vulnerabilities for the last three decades?

I'm not complaining about the downmods, I'm just weirded out - it's like a music forum disagreeing that flutes are real.

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

#188
post #98
post #78

> Ubuntu is the most widely deployed Linux operating system Nitpicking, but I thought Android was the most widely deployed Linux OS around...

I was Ubuntu user until they've introduced snap and started forcing it down everybody's throat. No more Ubuntu for me.

For me it was their begging for money on install.

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

#189
post #66

Earlier quoted context omitted.

I don't think you can realistically enforce a security boundary between root, and a user account that occasionally elevates. You can enforce a boundary between root and an account that never elevates though. And as far as I understand hardening sudo helps with that.

Why not? The way Windows does it should work in theory I think? Maybe you can't realistically do it on Linux , because Linux doesn't care about desktop security and doesn't have the kind of privileged GUI that you need.

The way Windows does it is users are prompted to elevate permissions, and can be tricked into clicking "Yes," just like users can be tricked into using sudo.

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

#190
post #79

Earlier quoted context omitted.

Who are you shouting at? Going back to the topic of the discussion, making sudo more resilient prevents a whole class of possible bugs (see CVE-2021-3156). You may not like sudo, but it is very commonly used to manage access, prevent accidental errors, or improve accountability on Linux servers and workstations. It is not going away. Therefore, improving sudo is a worthwhile goal and a thing to be celebrated.

I'm not shouting. >sudo more resilient prevents a whole class of possible bugs Good, but this doesn't fix the easiest way to escalate privileges as an attacker through sudo. Memory safety doesn't help people who run "curl | sudo bash" to install a random program from the internet. >It is not going away. But if work is done it could become very niche and eventually stop getting new usage over time.

> I'm not shouting.

In text format, all-caps or the use of an exclamation mark are often used to indicate shouting.

So, it is not unreasonable for people to read your sentence as such.

Post reply on HN