Live data from Hacker News

Memory-safe sudo to become the default in Ubuntu

trifectatech.org

141–150 of 282 posts

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

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

A major improvement would be to get rid of glibc altogether. As long as glibc is the default, the problems persist.

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

#142

Earlier quoted context omitted.

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.

I don't see how this attack is related to the setuid binary. No matter what method you provide to the user to elevate their privileges, they can be tricked into doing it. If it was provided by a daemon, built into systemd, or anything else, the problem would be the same.

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

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

What? Is this some snap thing because apt sure as hell doesn't do this without you configuring it explicitly.

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

#144
post #78

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

You are correct but in this context Linux means GNU/Linux.

Bit like how tomato is technically a fruit but everyone knows that in the context of a supermarket it’s a vegtable

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

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

The features we specifically don’t support are those related to direct LDAP support within sudo, so things like loading a sudoers file directly from LDAP. Sudo-rs will use any user retrieved via NSS, such as when configured using SSSD to load LDAP users. And from the authentication side you can use whatever PAM supports, so anything like Kerberos etc, which again can be coupled with the same LDAP database.

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

#146
post #47

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

This one is easy: run0 is not implemented in a memory-safe language, but in C. It is likely to be hit by exploitable memory-handling bugs, like the rest of systemd, as has happened multiple times before.

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

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

Uh, didn't I say exactly that? Gnu/Linux Is just collegially known as "Linux" and the operation system suffix made it clear what he was talking about. I didn't come up with the usage of the term, I was merely trying to interpret their words.

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

#148

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.

Its more that it ceased to be true: you can build a "nognu" Linux now, with LLVM as the system compiler, and musl/libc++ instead of glibc/libstdc++. https://distfiles.gentoo.org/releases/amd64/autobuilds/curre...

Or use Chimera Linux.

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

#149
post #78

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

You are correct but in this context Linux means GNU/Linux. Bit like how tomato is technically a fruit but everyone knows that in the context of a supermarket it’s a vegtable

Ironically, Ubuntu's efforts to replace its GNU components with non-GNU alternatives is very quickly going to turn it back into just Linux.

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

#150
post #140

Earlier quoted context omitted.

I think you mean a magic bullet instead of a smoking gun :)

I meant "smoking gun" from a cyber security perspective, i.e. the conclusion or the final part of the investigation. "magic bullet" would also work here too though.

Evidence, particularly of a crime, that is difficult or impossible to dispute. [1]

Even with your explanation I don't think it fits here.

[1] https://en.m.wiktionary.org/wiki/smoking_gun

Post reply on HN