News for hackers. Stuff that matters.
Re:System Down: A systemd-journald exploit by StreamBright on Thursday January 10, 2019 @10:10AM (#18874335)
You must be joking. What meritocracy? The guy who wrote systemd had already a major failed projects under his belt. PulseAudio rings a bell? Every reasonable person understand that separation of concerns is a good thing. Systemd does the exact opposite.

Few articles to be familiar with regarding systemd:

https://www.dedoimedo.com/computers/software-development-can...

"The same can be said of the init systems in Linux, like systemd. In a nutshell, the system should start quickly and get into a working session. We had this in 2010 or so, with boot times down to mere 10 seconds using init. No flaws, no bugs. Even in the commercial sphere, working with init, I do not recall any major problems.

Then, suddenly, we have this new binary diarrhea with a hundred million modules, and for the past five years, this unstable, half-baked, undebuggable nonsense is the backbone of most Linux distros. The invasive and pervasive nature of the systemd framework has also affected the stability of the user space, the very thing it should never have touched, and pretty much all problems with the quality of the Linux desktop nicely coincide with the introduction of systemd. The development continues, of course, and for no good reason than trying to reach the level of stability, maturity and functionality that we had half a decade ago. Someone landed themselves a lot of monthly pay checks by writing complex code to solve a problem that did not exist."

https://ewontfix.com/14/

"None of the things systemd "does right" are at all revolutionary. They've been done many times before. DJB's daemontools, runit, and Supervisor, among others, have solved the "legacy init is broken" problem over and over again (though each with some of their own flaws). Their failure to displace legacy sysvinit in major distributions had nothing to do with whether they solved the problem, and everything to do with marketing. Said differently, there's nothing great and revolutionary about systemd. Its popularity is purely the result of an aggressive, dictatorial marketing strategy including elements such as:

Engulfing other "essential" system components like udev and making them difficult or impossible to use without systemd (but see eudev).

Setting up for API lock-in (having the DBus interfaces provided by systemd become a necessary API that user-level programs depend on).

Dictating policy rather than being scoped such that the user, administrator, or systems integrator (distribution) has to provide glue. This eliminates bikesheds and thereby fast-tracks adoption at the expense of flexibility and diversity."

Solaris already had a better replacement for initv so did some linux distros.

I think we need a better alternative that does not behave as a black hole, ntp, dns resolution, logging etc. do not get sucked into it and finally we need a way better implementation that does not have a remove or local priv escalation every other week[1].

https://github.com/systemd/systemd/issues

Re:System Down: A systemd-journald exploit by theamk on Thursday January 10, 2019 @10:54AM (#18874712)
Are you saying that entire TC of Debian was intimidated by Poettering? And then later, in general election, he forced majority of votes to say "we are fine with systemd"? [0]

I find this highly unlikely. Here is my take: people were tired with "sysvinit". Of all alternatives, systemd sucked less. So they went with it.

[0] https://news.ycombinator.com/item?id=18874100

Re:System Down: A systemd-journald exploit by rleigh on Thursday January 10, 2019 @11:46AM (#18875288)
There was a heavy influence from the GNOME camp, both upstream and within Debian, by mandating the use of systemd with GNOME. At the time, I wasn't particularly happy at the disproportionate influence for a specific desktop use case at the expense of other use cases e.g. embedded, server and others.
Re:System Down: A systemd-journald exploit by geggam on Thursday January 10, 2019 @11:13AM (#18874902)
Surely you enjoy the irony of the move to microservices and isolation when merging so many functions into init ?
Re:System Down: A systemd-journald exploit by theamk on Thursday January 10, 2019 @11:30AM (#18875080)
I am not sure what you are getting at. "systemd" deb package does contain lots of binaries, 73 in my case:

    dpkg -L systemd | xargs stat -c '%F %A %n' | grep file.*rwx | wc -l
    73

Each binary does one thing. So for example /lib/systemd/systemd, the PID 1 process, only starts processes, nothing else.

Now, some people complain that "systemd" package contain other binaries, like systemd-networkd, or systemd-journal-gatewayd (the HTTP server). I don't understand their problems. Sure, it is annoying that "systemd" package contains network manager -- but you don't have to use it; in fact, I am not using it at all.

So I do not see the irony. I think 73 binaries, each optional, easily replaceable, and doing only one thing, is very much inline to microservices philosophy.

Re:System Down: A systemd-journald exploit by rleigh on Thursday January 10, 2019 @11:50AM (#18875338)
The number of binaries isn't in and of itself a good measure. It says nothing about the tight coupling and poorly documented interfaces which tie them all together.

There are two major things to consider here:

- how easy is it to replace each of these with an independent third-party implementation - if it is possible, why should the design of that component be dictated by the systemd upstream

A huge amount of the value of Linux was the fact that the system was a loosely-coupled collection of parts. Much of that flexibility has been lost, and with it the utility which drove a lot of the adoption of Linux in the first place.

Re:System Down: A systemd-journald exploit by theamk on Thursday January 10, 2019 @01:08PM (#18876277)
Re "how easy is it to replace each of these with an independent third-party implementation"

What did you have in mind when you were talking about hard-to-replace implementation?

I find the replacing all those components to be pretty easy. Those things are all loaded via regular unit files, and they need just one symlink to be completely disabled.

In particular, systemd-networkd is entirely optional, and ifupdown is still supported in ubuntu (even if not installed by default).

systemd-timesyncd is a regular service, and can be disabled directly, or via timedatectl. ntpdate still works when it is disabled.

Many other services, like systemd-hostnamed, do not even run by default. You could disabled them by default and things would still work.

The worst offender is probably systemd-logind, but luckily I did not have to deal with it. Looks like it only needed for GUI logins, not ssh one -- so most sysadmins would not have to care. That said, I did try to use it's predecessor, ConsoleKit, and it was pretty horrible as well.

Re:System Down: A systemd-journald exploit by zbentley on Friday January 11, 2019 @08:39AM (#18883475)
> 73 binaries, each optional, easily replaceable.

Except for the journal. It is effectively required by systemd (the pid 1 binary). In the vast majority of cases, that means running systemd-journald.

Every attempt I have seen at operating without it either misses early logs or is extremely fragile/unsupported.

That's a point of fact, not a position in the larger argument here. There are good arguments as to why journald should be effectively a required component.

> /lib/systemd/systemd, the PID 1 process, only starts processes, nothing else.

That is incorrect. It also interacts with the journal, the component implicated in the exploit in the article.

Re:System Down: A systemd-journald exploit by theamk on Friday January 11, 2019 @11:41AM (#18884690)
> Except for the journal. It is effectively required by systemd (the pid 1 binary). In the vast majority of cases, that means running systemd-journald.

    man systemd
    ...
    --log-target=
           Set log target. Argument must be one of console, journal, kmsg, journal-or-kmsg, null.
you can log to kmsg -- the messages won't be lost.

> Every attempt I have seen at operating without it either misses early logs or is extremely fragile/unsupported.

I am not surprised -- this was one of many annoying parts of sysvinit, the missing early userspace logs. This was one of the many annoying parts. Gentoo used to have a hacky way that scraped screen buffer (!) but I think it broke at some point[1].

> That is incorrect. It also interacts with the journal, the component implicated in the exploit in the article.

Fair enough, I oversimplified. It also interacts with udev, systemctl, and does cronjob handling and network interface renaming.

[1] I just checked Gentoo's website now and looks like they have a better way now due to OpenRC.

Re:System Down: A systemd-journald exploit by geggam on Thursday January 10, 2019 @01:27PM (#18876463)
The decoupling of services is the trend of microservices. Systemd is merging many previously decoupled systems to manage them and provide a platform for decoupled services.

Seems ironic to me is all

Re:System Down: A systemd-journald exploit by theamk on Thursday January 10, 2019 @02:17PM (#18877026)
For me, "decoupling" means running separate processes with well-defined interfaces. Systemd does exactly that -- it has many separate processes, each with well-defined interfaces. For example, systemd-timesyncd can be run on any machine with dbus, and does not require systemd init at all.

The only "merging" systemd does is that it puts multiple binaries into one package, other than that they are completely separate. While it is annoying waste of space, there is no reason to suspect "coupling".

Re:System Down: A systemd-journald exploit by geggam on Friday January 11, 2019 @02:01PM (#18885913)
Your idea of well defined and mine are somewhat different :)
Re:System Down: A systemd-journald exploit by theamk on Friday January 11, 2019 @03:14PM (#18886519)
Can you be more specific, please? Like which interface is not well defined?

I find the fact that systemd internals are connected via the same mechanisms as non-systemd apps (units, sockets and so on) very nice, especially compared to sysvinit or upstart. Have you tried to patch network detection in upstart? Not an easy job. And upstart's manpages are less than useful, compared to systemd's.

Above in the other threads someone said "journal". This is a good point, except there is --log-target=kmsg option which disables that interface and switches it to good old kmsg which anyone can parse and read.

Any others?