News for hackers. Stuff that matters.
Re:Systemd Wants to Expand to Include a Sudo Replacement by Faaak on Tuesday April 30, 2024 @03:49AM (#40208286)
Yeah, basically I've found that the people the more vocal against systemd are either not really knowing how it works behind the scenes, and just criticizing for the sake of it (or because other people do so), or criticizing from an ideological point of view (do one thing and do it well). They see systemd as an octopus, not following the unix ideology. Which I don't really agree tbh
Re:Systemd Wants to Expand to Include a Sudo Replacement by hanselot on Tuesday April 30, 2024 @04:10AM (#40208422)
Well, you don't have to understand the underlying concepts that deeply to know that putting all your xzs in one basket is a bad idea.

There is no single piece of software that has given me more Microsoft EEE vibes in the past decade than systemd

The attack vector for systemd is already enormous, but the inclusion of sudo seems like the most blatant attempt I've yet seen to put the final piece of this nation state backdoor in place.

Re:Systemd Wants to Expand to Include a Sudo Replacement by throwaway598 on Tuesday April 30, 2024 @04:48AM (#40208645)
The root of the problem is sudo, and su more generally. This derives from *nix, or mainstream versions today, requiring a super user, a manifestation of the problem with monolithic kernals. A microkernal may be a stepping stone to improving this but even this is not a solution. The only solution is no kernal space, no privileged user(s), all processes negotiate independently with each other.
Re:Systemd Wants to Expand to Include a Sudo Replacement by metalforever on Tuesday April 30, 2024 @03:38PM (#40215326)
No the root of the problem is the large attack surface systemd is creating by tightly coupling a ton of tools together, I agree about the microkernel idea completely though.
Re:Systemd Wants to Expand to Include a Sudo Replacement by dale_glass on Tuesday April 30, 2024 @04:58AM (#40208710)
systemd isn't a single piece of software. It's a collection of software with an unified theme, like KDE or Gnome.

Attack surface-wise, I don't think there's much difference between "sudo" being a part of the systemd package and not. Either way there's "sudo" code to be targeted, which package it's part of is just a technicality.

Re:Systemd Wants to Expand to Include a Sudo Replacement by SAI_Peregrinus on Tuesday April 30, 2024 @09:57AM (#40211011)
I like to compare Systemd to GNU. Pretty similar scale, similar "take over the world" levels of adoption in Linux (GNU's libc is in nearly everything, all the other GNU tools are ridiculously common), adds lots of attack surface to what used to be single-purpose simple tools, etc. Just about every criticism of Systemd applies just as well to GNU.
Re:Systemd Wants to Expand to Include a Sudo Replacement by fsflover on Tuesday April 30, 2024 @05:34PM (#40216650)
Re:Systemd Wants to Expand to Include a Sudo Replacement by StimDeck on Tuesday April 30, 2024 @05:41AM (#40209002)
Systemd mentality is what made it possible for a binary blob in XZ Utils to create a backdoor in SSH.
Re:Systemd Wants to Expand to Include a Sudo Replacement by growse on Tuesday April 30, 2024 @05:46AM (#40209034)
I think dynamic linking pre-dates systemd by quite a number of years.
Re:Systemd Wants to Expand to Include a Sudo Replacement by StimDeck on Tuesday April 30, 2024 @06:08AM (#40209169)
SSH being linked to XZ doesn’t.
Re:Systemd Wants to Expand to Include a Sudo Replacement by growse on Tuesday April 30, 2024 @07:19AM (#40209743)
So aim your ire at the distributions who (I agree) cocked this one up. "Take a library dependency to implement basic functionality" is not a systemd mentality, it's pernicious throughout software development - see leftPad as another example.
Re:Systemd Wants to Expand to Include a Sudo Replacement by immibis on Tuesday April 30, 2024 @03:21PM (#40215112)
"Put everything in one big ball" is systemd mentality AND something that enabled the xz exploit to work.
Re:Systemd Wants to Expand to Include a Sudo Replacement by growse on Tuesday April 30, 2024 @05:53PM (#40216864)
Lots of things enabled the xz exploit to work.

If the lesson you take from xz is "systemd bad" then you've really missed the wood for the trees.

Re:Systemd Wants to Expand to Include a Sudo Replacement by immibis on Tuesday April 30, 2024 @06:42PM (#40217338)
It's one of many things to consider. Think of it as sandboxing, or attack surface reduction. Should we expose everything to everything else, or should it be on a need-to-know basis?
Re:Systemd Wants to Expand to Include a Sudo Replacement by SR2Z on Tuesday April 30, 2024 @02:55PM (#40214774)
Why wouldn't SSH be linked to XZ? Isn't it supported as a compression method for connections?
Re:Systemd Wants to Expand to Include a Sudo Replacement by yjftsjthsd-h on Tuesday April 30, 2024 @03:16PM (#40215048)
IIRC, xz was used by a systemd library, and that systemd library got added to sshd so it could tell systemd when it had started or something like that. SSH itself doesn't use xz.
Re:Systemd Wants to Expand to Include a Sudo Replacement by riddley on Tuesday April 30, 2024 @06:08PM (#40217025)
xz is a compression library.
Re:Systemd Wants to Expand to Include a Sudo Replacement by yjftsjthsd-h on Tuesday April 30, 2024 @07:55PM (#40217925)
I'm aware? It's a compression library that is used by systemd, including in a systemd library that got added to sshd in some distros.
Re:Systemd Wants to Expand to Include a Sudo Replacement by fullstop on Wednesday May 01, 2024 @10:14AM (#40223529)
ssh out of the box also does not use libsystemd, except on systems which were patched to do so.
Re:Systemd Wants to Expand to Include a Sudo Replacement by pwg on Wednesday May 01, 2024 @11:48AM (#40224950)
SSH does not support/use lzma/xz compression method for the SSH protocol.

The xz linkage was indirect through a systemd library that some systemd systems link into sshd.

Re:Systemd Wants to Expand to Include a Sudo Replacement by tommiegannert on Tuesday April 30, 2024 @03:11PM (#40214989)
My Ubuntu /usr/sbin/sshd already links to libz, liblzma, liblz4 and libzstd. I don't see why linking to libxz would be so outrageous. All-in-all, ldd reports 26 libraries.

They attacked the weakest link, and systemd was just a small pawn in that game. Sure, a smaller attack surface is better, but it's not like OpenSSHd has a small attack surface even without libsystemd. Not even in projects with a similar possibility of obscure "test data."

Re:Systemd Wants to Expand to Include a Sudo Replacement by michaelmrose on Tuesday April 30, 2024 @04:06PM (#40215680)
In void it links 11 and includes only libz of the items you listed.
Re:Systemd Wants to Expand to Include a Sudo Replacement by t-3 on Tuesday April 30, 2024 @08:58PM (#40218362)
On OpenBSD it links 4 libraries. On my crux linux installation, 7.
Re:Systemd Wants to Expand to Include a Sudo Replacement by jwilk on Wednesday May 01, 2024 @03:33AM (#40220509)
> My Ubuntu /usr/sbin/sshd already links to libz, liblzma, liblz4 and libzstd.

Except for libz, they are only linked indirectly through libsystemd.

> I don't see why linking to libxz would be so outrageous

The XZ Utils library is called liblzma, not libxz.

Re:Systemd Wants to Expand to Include a Sudo Replacement by tommiegannert on Wednesday May 01, 2024 @03:56AM (#40220650)
> Except for libz, they are only linked indirectly though libsystemd.

Ah, that invalidates my point re. obscure test data. Sloppy use of ldd. (I'm guessing it would be much harder making such an attack on a crypto library.)

Thanks.

Re:Systemd Wants to Expand to Include a Sudo Replacement by _flux on Wednesday May 01, 2024 @03:22AM (#40220443)
They didn't need to use the library to make use of the systemd notify mechanism, which is simple to interface and quite a nice feature in the first place.

The free-standing implementation: https://github.com/openssh/openssh-portable/commit/08f579231...

Re:Systemd Wants to Expand to Include a Sudo Replacement by jacoblambda on Tuesday April 30, 2024 @12:19PM (#40212740)
The issue is that it's not just ideological. "Do one thing and do it well" is important because if you want to port software to another platform, it's a lot easier to port a single dependency component over to make it work than it is to port over the entire framework.

This is a serious problem and it makes it way harder to make things cross platform.

Re:Systemd Wants to Expand to Include a Sudo Replacement by Xylakant on Tuesday April 30, 2024 @03:23PM (#40215134)
Systemd was written specifically for Linux, hard depends on a list of features provided by the Linux kernel and leverages them to do its work. Porting it to another kernel is a rewrite. Lack of portability is in this case a design tradeoff.
Re:Systemd Wants to Expand to Include a Sudo Replacement by jacoblambda on Tuesday April 30, 2024 @04:00PM (#40215607)
Sure that is the case for systemd itself but it's not the case for most projects that happen to use things systemd provides.

There is very little benefit for most userspace software to tie itself to systemd and by extension linux when otherwise it could be portable to any unix or unix like platform. Especially when an alternative, portable solution already exists and is well established.

Re:Systemd Wants to Expand to Include a Sudo Replacement by fhars on Tuesday April 30, 2024 @04:00PM (#40215608)
The argument was that this design of systemd makes it hard to write applications that are portable, so that systemd is effectively a very big net negative to the open source ecosystem, because it causes massive fragmentation.
Re:Systemd Wants to Expand to Include a Sudo Replacement by dijit on Tuesday April 30, 2024 @08:12PM (#40218038)
I think this is a really old statement. I’ve used systemd since it was made default in Fedora back in 2011 (Lovelock, anyone?) - at what point am I qualified to have an opinion, after having used it personally for 13 years and professionally for 8.

systemd is scary for 3 reasons.

1. it is inscrutable. Debugging it is nearly impossible, so you had better hope you don’t get a buggy release, especially with how hostile the devs can be.

2. it is large, and growing. Lots of things it claims are optional are in reality: not really. This is fine until uou get something that really doesnt work well (systemd-resolved is consistently the largest reason I have connectivity issues, wether it be because it interferes with docker inter-container networking or because it needs to time-out when trying DNSSec to continue- or if it fights with my vpn provider for power over my resolvers etc). Due to my distro being very tied to it: I gotta keep using it and working around it.

3. The interface is irreplaceable. Why are their 13 init systems? Because init is a closed scope. To be a sucessful init you need to spawn processes and do it cheaply. Supervising processes after start? Noble, and there were implementations that could do that (CDDL licensed SMF from Solaris for example). However we have already reached the state where it will be literal man-decades of work to replace systemd as we will need to make any replacement bug compatible with systemd itself. Its the ultimate show stopper.

The implementation is the reference. Which is a large departure now from what came before.