back to article The D in Systemd stands for 'Dammmmit!' A nasty DHCPv6 packet can pwn a vulnerable Linux box

A security bug in Systemd can be exploited over the network to, at best, potentially crash a vulnerable Linux machine, or, at worst, execute malicious code on the box. The flaw therefore puts Systemd-powered Linux computers – specifically those using systemd-networkd – at risk of remote hijacking: maliciously crafted DHCPv6 …

        1. AdamWill

          Re: There is a reason ...

          Well, it depends what you mean by "why bother with". Who's doing the "bother"ing?

          If you mean "why bother writing it?", well, the systemd authors think it's a good idea and would *like* people to use it. So far, distros have generally decided not to adopt it. I'm just relaying facts here, I'm not sure why I'm getting flooded with downvotes. Everything I said is easily verifiable. Just go install a default Fedora or Ubuntu system and check for yourself: you'll have systemd, but you *won't* have systemd-networkd running.

          1. Anonymous Coward
            Anonymous Coward

            Re: There is a reason ...

            "Just go install a default Fedora or Ubuntu system and check for yourself: you'll have systemd, but you *won't* have systemd-networkd running."

            Funny that I installed ubuntu 18.04 a few weeks ago and the fucking thing installed itself then! ( and was a fucking pain to remove).

            LP is a fucking arsehole.

            1. AdamWill

              Re: There is a reason ...

              "Funny that I installed ubuntu 18.04 a few weeks ago and the fucking thing installed itself then! ( and was a fucking pain to remove)."

              So I looked into it a bit more, and from a few references at least, it seems like Ubuntu has a sort of network configuration abstraction thingy that can use both NM and systemd-networkd as backends; on Ubuntu desktop flavors NM is usually the default, but apparently for recent Ubuntu Server, networkd might indeed be the default. I didn't notice that as, whenever I want to check what's going on in Ubuntu land, I tend to install the default desktop spin...

              "LP is a fucking arsehole."

              systemd's a lot bigger than Lennart, you know. If my grep fu is correct, out of 1543 commits to networkd, only 298 are from Lennart...

              1. Anonymous Coward
                Anonymous Coward

                Re: There is a reason ...

                "If my grep fu is correct, out of 1543 commits to networkd, only 298 are from Lennart..."

                Irrelevant when nothing not approved and/or designed by Lennart is not going to survive.

                CV-padding for the rest.

        2. Orv Silver badge

          Re: There is a reason ...

          Pardon my ignorance (I don't use a distro with systemd) why bother with networkd in the first place if you don't have to use it.

          Mostly because the old-style init system doesn't cope all that well with systems that move from network to network. It works for systems with a static IP, or that do a DHCP request at boot, but it falls down on anything more dynamic.

          In order to avoid restarting the whole network system every time they switch WiFi access points, people have kludged on solutions like NetworkManager. But it's hard to argue it's more stable or secure than networkd. And this is always going to be a point of vulnerability because anything that manipulates network interfaces will have to be running as root.

          These days networking is essential to the basic functionality of most computers; I think there's a good argument that it doesn't make much sense to treat it as a second-class citizen.

          1. Anonymous Coward
            Anonymous Coward

            Re: There is a reason ...

            Mostly because the old-style init system doesn't cope all that well with systems that move from network to network. It works for systems with a static IP, or that do a DHCP request at boot, but it falls down on anything more dynamic.

            Funny. I used to cart laptops between home and worksites, often only 'sleeping' between sites. Never had a problem with the wired or wireless network changes. Only times there was an issue was when the network itself had issues. This was back when I had to put nearly a week's wages on a PCMCIA card to even get wireless into the laptop. Still got the matching PCMCIA card that provided the wired network BTW.

            Don't recall init having much to do with it. The system certainly seemed quite capable of figuring out it was on a new network and checking out what was there.

            Of course back then there were few wireless spots and most computers stayed where they were put. A glorius age before the demon spawns of google and potty-thing were known. Though I think we may've had "Poor users loose sound every time" in there somewhere.

            1. Orv Silver badge

              Re: There is a reason ...

              Funny. I used to cart laptops between home and worksites, often only 'sleeping' between sites. Never had a problem with the wired or wireless network changes. Only times there was an issue was when the network itself had issues. This was back when I had to put nearly a week's wages on a PCMCIA card to even get wireless into the laptop. Still got the matching PCMCIA card that provided the wired network BTW.

              I remember that era too. I also remember having to fiddle around on the command line every time I switched networks. At the time it seemed acceptable because WiFi was so new and shiny. Now I'd be kind of annoyed, I think.

              Also, if you got 1990s Linux to actually wake up from sleep consistently you were doing pretty well. ;)

              1. Anonymous Coward
                Anonymous Coward

                Re: There is a reason ...

                I remember that era too. I also remember having to fiddle around on the command line every time I switched networks.

                I wonder if it's because I'd used OpenDNS (and hard-wired into the config) - I honestly had little or no trouble changing things.

                But with your mention of CLI I did some digging and on backups from an old machine[1] I have a few configuration files for different networks but no reference to the files in the bash history file (which was getting pretty big), aside for one that was created for ad-hoc wireless networks. I can't quite remember why, perhaps when I travelled I did some network gaming with someone who didn't have a hub/switch at their place or something.

                Also, if you got 1990s Linux to actually wake up from sleep consistently you were doing pretty well. ;)

                Until Devuan, I've not had much luck with sleep or hibernate on Linux for some years, especially on Mint. The hardware ranges from 2007-era machines to 2017-era machines (one with an 8 core AMD CPU that still sells for $hundreds, though I cannot remember the model or spec off the top of my head).

                With Mint, the machine would often hang with sleep and while it'd seem to hibernate OK, it'd not come back up to the same place. I generally configure swap as more than double RAM, often a fair bit more in hopes of adding RAM later (eg with 8G ram I'd do a 32G swap, assuming I have the HDD space). With Devuan, on that same desktop and with the D630 laptop I'm using right now sleep/hibernate work as expected.

                [1] Yes, I have backups of home folders and desktops covering nearly 2 decades. I definitely have to post anonymously otherwise men in pretty white coats will be knocking on my door!

          2. ds6 Silver badge
            Facepalm

            Re: There is a reason ...

            "Mostly because the old-style init system doesn't cope all that well with systems that move from network to network."

            It is absolutely attitudes like this that resulted in the black hole that is systemd.

            What relation does the DHCP client have to the init system? Hint: absolutely nothing. The init system or "suite" as they're calling it, should NOT be responsible for DHCP.

            "Old-style init system[s]" are not at fault for network issues when a proper roaming DHCP client is not installed, wpa_supplicant isn't configured, etc. I have been using Alpine Linux on my laptop for a while now—no GNU, no FreeDesktop, no Poettering. udhcpc comes with busybox and works absolutely fine, in conjunction with wpa_supplicant and a trigger script to automatically re-run udhcpc when a network change is detected.

            init should get the system going and nothing else. Maybe a function of the solution will work as a service manager, and maybe it will start your networking for you. At that point, if your network client is not smart enough to figure out how to reconnect to a network then it is that application's fault and not the init.

            "These days networking is essential to the basic functionality of most computers; I think there's a good argument that it doesn't make much sense to treat it as a second-class citizen."

            What does that even mean? Are you implying systemd-networkd is a superior solution? When it just had a potentially dangerous exploit patched??? It's rather presumptuous to consider alternative, non-systemd DHCP softwares to be the equivalent of "second-class citizen[s]".

      1. Anonymous Coward
        Anonymous Coward

        Re: There is a reason ...

        "That's why systemd-networkd is a separate, optional component, and not actually part of the init daemon at all. "

        Semi-false: systemd is not optional and none of the components of it are either, in practise.

        Either you have systemd and everything Lennart has invented or none of them. Or miss major pieces of functionality in your OS.

  1. alain williams Silver badge

    Old is good

    in many respects when it comes to software because, over time, the bugs will have been found and squashed. Systemd brings in a lot of new code which will, naturally, have lots of bugs that will take time to find & remove. This is why we get problems like this DHCP one.

    Much as I like the venerable init: it did need replacing. Systemd is one way to go, more flexible, etc, etc. Something event driven is a good approach.

    One of the main problems with systemd is that it has become too big, slurped up lots of functionality which has removed choice, increased fragility. They should have concentrated on adding ways of talking to existing daemons, eg dhcpd, through an API/something. This would have reused old code (good) and allowed other implementations to use the API - this letting people choose what they wanted to run.

    But no: Poettering seems to want to build a Cathedral rather than a Bazzar.

    He appears to want to make it his way or no way. This is bad, one reason that *nix is good is because different solutions to a problem have been able to be chosen, one removed and another slotted in. This encourages competition and the 'best of breed' comes out on top. Poettering is endangering that process.

    Also: he refusal to accept patches to let it work on non-Linux Unix is just plain nasty.

    1. bombastic bob Silver badge
      Devil

      Re: Old is good

      "Poettering seems to want to build a Cathedral rather than a Bazzar."

      a road side fruit/veggie stand would be adequate in this case. or a convenience store.

      1. jake Silver badge

        Re: Old is good

        Even those are too complex for an init. I think a garden gate with an attached rain gauge would just about cover it.

        1. Martin Gregorie

          Re: Old is good

          A garden gate's purpose is to be opened let somebody through and closed to keep them out - full stop.

          Fitting a rain gauge is a backward step: it not only adds unwanted complexity, but degrades rain measurement due to spillage when the gate bangs in the wind.

          1. jake Silver badge

            Re: Old is good

            The garden gate allows authorized users access to the garden.The rain gauge is a primitive logging facility. The frame of the gate is part of the gate and doesn't swing.

            1. Tom 7

              Re: Old is good

              "The frame of the gate is part of the gate and doesn't swing." No, but it certainly bounces around when the gate slams shut in a strong breeze.

              1. jake Silver badge

                Re: Old is good

                "No, but it certainly bounces around when the gate slams shut in a strong breeze."

                Mine doesn't. Perhaps you need a new coderhandyman?

    2. onefang

      Re: Old is good

      "Also: he refusal to accept patches to let it work on non-Linux Unix is just plain nasty."

      Though likely a big sigh of relief for users of those other Unix variants.

      1. bombastic bob Silver badge
        Thumb Up

        Re: Old is good

        "refusal to accept patches to let it work on non-Linux Unix"

        "likely a big sigh of relief for users of those other Unix variants."

        YESSSSS!!!!!!!!

    3. Doctor Syntax Silver badge

      Re: Old is good

      "refusal to accept patches to let it work on non-Linux Unix is just plain nasty."

      Who would want to run it on non-Linux Unix systems? I can't imagine any of the BSDs wanting such a thing.

      1. Dan 55 Silver badge

        Re: Old is good

        I can't imagine any of the BSDs wanting such a thing.

        I think Poettering knows he wouldn't survive Theo de Raadt bollocking him every other week, that's why he won't allow it to be ported to BSD.

        1. Doctor Syntax Silver badge

          Re: Old is good

          "Theo de Raadt bollocking him every other week"

          As infrequently as that?

      2. Anonymous Coward
        Anonymous Coward

        Re: Old is good

        I cant imagine any of the linux's wanting such a thing - but it has happened.

    4. oiseau
      Stop

      Re: Old is good

      Hello:

      One of the main problems with systemd is that it has become too big, slurped up lots of functionality which has removed choice, increased fragility.

      IMO, there is a striking paralell between systemd and the registry in Windows OSs.

      After many years of dealing with the registry (W98 to XPSP3) I ended up seeing the registry as a sort of developer sanctioned virus running inside the OS, constantly changing and going deeper and deeper into the OS with every iteration and as a result, progressively putting an end to the possibility of knowing/controlling what was going on inside your box/the OS.

      Years later, when I learned about the existence of systemd (I was already running Ubuntu) and read up on what it did and how it did it, it dawned on me that systemd was nothing more than a registry class virus and it was infecting Linux_land at the behest of the developers involved.

      So I moved from Ubuntu to PCLinuxOS and then on to Devuan.

      Call me paranoid but I am convinced that there are people both inside and outside IT that actually want this and are quite willing to pay shitloads of money for it to happen.

      I don't see this MS cozying up to Linux in various ways lately as a coincidence: these things do not happen just because or on a senior manager's whim.

      What I do see (YMMV) is systemd being a sort of convergence of Linux with Windows, which will not be good for Linux and may well be its undoing.

      Cheers,

      O.

      1. Anonymous Coward
        Anonymous Coward

        Re: Old is good

        "IMO, there is a striking paralell between systemd and the registry in Windows OSs."

        No wonder, MS-coding practises and quality reeks on both and I'm suspecting that Lennart-boy is a huge Microsoft fan boy, but they didn't hire him because of his ego, so he decided to to something similar to Linux.

        Explains nicely the feature creep and responses to criticism: He's a good boy from Redmont.

    5. Rich 2 Silver badge
      Pint

      Re: Old is good

      "Also: he refusal to accept patches to let it work on non-Linux Unix is just plain nasty"

      Thank goodness this crap is unlikely to escape from Linux!

      By the way, for a systemd-free Linux, try void - it's rather good.

    6. Michael Wojcik Silver badge

      Re: Old is good

      Much as I like the venerable init: it did need replacing.

      For some use cases, perhaps. Not for any of mine. SysV init, or even BSD init, does everything I need a Linux or UNIX init system to do. And I don't need any of the other crap that's been built into or hung off systemd, either.

      1. Orv Silver badge

        Re: Old is good

        BSD init and SysV init work pretty darn well for their original purpose -- servers with static IP addresses that are rebooted no more than once in a fortnight. Anything more dynamic starts to give it trouble.

    7. Anonymous Coward
      Anonymous Coward

      Re: Old is good

      "Systemd brings in a lot of new code which will, naturally, have lots of bugs that will take time to find & remove. "

      Yes. But the problem is that most of the new code is totally unnecessary and the sole function of it is to do things Lennart wants to do things: It's not any better than old code and it doesn't do even the same things as old code did (but less), it just does things differently for the sake of doing them in the different way.

      Just because the head honcho is an arrogant prick. No other reason exists.

      Lennart invents square wheel and claims it's better because it's new and _he made it_.

  2. Chairman of the Bored

    Too bad Linus swore off swearing

    Situations like this go beyond a little "golly gee, I screwed up some C"...

    1. jake Silver badge

      Re: Too bad Linus swore off swearing

      Linus doesn't care. systemd has nothing to do with the kernel ... other than the fact that the lead devs for systemd have been banned from working on the kernel because they don't play nice with others.

  3. JLV Silver badge
    Thumb Down

    how did it get to this?

    I've been using runit, because I am too lazy and clueless to write init scripts reliably. It's very lightweight, runs on a bunch of systems and really does one thing - keep daemons up.

    I am not saying it's the best - but it looks like it has a very small codebase, it doesn't do much and generally has not bugged me after I configured each service correctly. I believe other systems also exist to avoid using init scripts directly. Not Monit, as it relies on you configuring the daemon start/stop commands elsewhere.

    On the other hand, systemd is a massive sprawl, does a lot of things - some of them useful, like dependencies and generally has needed more looking after. Twice I've had errors on a Django server that, after a lot of looking around ended up because something had changed in the, Chef-related, code that's exposed to systemd and esoteric (not emitted by systemd) errors resulted when systemd could not make sense of the incorrect configuration.

    I don't hate it - init scripts look a bit antiquated to me and they seem unforgiving to beginners - but I don't much like it. What I certainly do hate is how, in an OS that is supposed to be all about choice, sometime excessively so as in the window manager menagerie, we somehow ended up with one mandatory daemon scheduler on almost all distributions. Via, of all types of dependencies, the GUI layer. For a window manager that you may not even have installed.

    Talk about the antithesis of the Unix philosophy of do one thing, do it well.

    Oh, then there are also the security bugs and the project owner is an arrogant twat. That too.

    1. Doctor Syntax Silver badge

      Re: how did it get to this?

      "init scripts look a bit antiquated to me and they seem unforgiving to beginners"

      Init scripts are shell scripts. Shell scripts are as old as Unix. If you think that makes them antiquated then maybe Unix-like systems are not for you. In practice any sub-system generally gets its own scripts installed with the rest of the S/W so if being unforgiving puts beginners off tinkering with them so much the better. If an experienced Unix user really needs to modify one of the system-provided scripts their existing shell knowledge will let them do exactly what's needed. In the extreme, if you need to develop a new init script then you can do so in the same way as you'd develop any other script - edit and test from the command line.

      1. onefang

        Re: how did it get to this?

        "Init scripts are shell scripts."

        While generally true, some sysv init style inits can handle init "scripts" written in any language.

      2. This post has been deleted by its author

    2. Anonymous Coward
      Anonymous Coward

      Re: how did it get to this?

      I personally like openrc as an init system, but systemd is a symptom of the tooling problem.

      It's for me a retrograde step but again, it's linux, one can, as you and I do, just remove systemd.

      There are a lot of people in the industry now who don't seem able to cope with shell scripts nor are minded to research the arguments for or against shell as part of a unix style of system design.

      In conclusion, we are outnumbered, but it will eventually collapse under its own weight and a worthy successor shall rise, perhaps called SystemV, might have to shorten that name a bit.

      1. onefang

        Re: how did it get to this?

        "a worthy successor shall rise, perhaps called SystemV"

        Or some French coder might write SystèmE, could take a while to get to SystemV.

        1. Phil O'Sophical Silver badge
          Coat

          Re: how did it get to this?

          Never seems worth going beyond le Système D to me.

    3. Anonymous Coward
      Anonymous Coward

      Re: how did it get to this?

      " init scripts look a bit antiquated to me and they seem unforgiving to beginners "

      ... have you ever looked the sheer amount of scripts systemd is deploying?

      There are literally thousands of them, totally human un-readable shit.

      And yes, you need to change them manually in order to make changes in the system.

  4. AdamWill

    Just about nothing actually uses networkd

    "In addition to Ubuntu and Red Hat Enterprise Linux, Systemd has been adopted as a service manager for Debian, Fedora, CoreOS, Mint, and SUSE Linux Enterprise Server. We're told RHEL 7, at least, does not use the vulnerable component by default."

    I can tell you for sure that no version of Fedora does, either, and I'm fairly sure that neither does Debian, SLES or Mint. I don't know anything much about CoreOS, but https://coreos.com/os/docs/latest/network-config-with-networkd.html suggests it actually *might* use systemd-networkd.

    systemd-networkd is not part of the core systemd init daemon. It's an optional component, and most distros use some other network manager (like NetworkManager or wicd) by default.

    1. Christian Berger

      The important word here is "still"

      I mean commercial distributions seem to be particularly interested in trying out new things that can increase their number of support calls. It's probably just that networkd is either to new and therefore not yet in the release, or still works so badly even the most rudimentary tests fail.

      There is no reason to use that NTP daemon of systemd, yet more and more distros ship with it enabled, instead of some sane NTP-server.

    2. Anonymous Coward
      Anonymous Coward

      Re: Just about nothing actually uses networkd

      Mint definitely uses systemd. Pretty sure more recent Debians do (hence my move to Devuan), which means Ubuntu will.

      Know this from using them, and the sole reason I no longer use Mint and deeply sadly gave up using Debian.

  5. cantankerous swineherd

    now try getting a dual boot devuan / win 10 laptop set up...

    us grey beards don't have long enough lives to become vetern admins.

    1. onefang

      "us grey beards don't have long enough lives to become vetern admins."

      For some of us, that's how we got grey beards in the first place.

    2. BinkyTheMagicPaperclip Silver badge

      Dual boot Windows/Linux? Piece of piss.

      Install Windows first. Partition disk so that it has a minimum of two spare partitions for Linux and Linux Swap, or a number more if you want to separate out /var /opt /tmp /usr and /home.

      Boot Linux, change the partition ids, install GRUB or GRUB-efi at the end, then add in the Windows partition to the installer. LILO is pretty easy to get working too, but if you're running Salix be warned it always installs it on the first hard drive which may not be what you want..

      Alternatively, you can do this the other way by setting up a boot menu in Windows - EasyBCD is the simplest method, but the Windows 10 boot menu is rather shite, and basically consists of booting most of Windows before choosing the OS to boot.

  6. NLCSGRV

    The Curse of Poettering strikes again.

  7. _LC_
    Thumb Up

    Now hang on, please!

    Ser iss no neet to worry, systemd will becum stable soon after PulseAudio does.

    1. Ken Hagan Gold badge

      Re: Now hang on, please!

      I won't hold my breath, then. I have a laptop at the moment that refuses to boot because (as I've discovered from looking at the journal offline) pulseaudio is in an infinite loop waiting for the successful detection of some hardware that, presumably, I don't have.

      I imagine I can fix it by hacking the file-system (offline) so that fuckingpulse is no longer part of the boot configuration, but I shouldn't have to. A decent init system would be able to kick of everything else in parallel and if one particular service doesn't come up properly then it just logs the error. I *thought* that was one of the claimed advantages of systemd, but apparently that's just a load of horseshit.

      1. Teiwaz

        Re: Now hang on, please!

        if one particular service doesn't come up properly then it just logs the error. I *thought* that was one of the claimed advantages of systemd,

        Well, I'm on Archlinux, and that's what mine is doing (currently several services are misconfigured due to a location move and I've not gotten around to fixing them).

        If pulseaudio fails on my system, it falls back to ALSA.

      2. sitta_europea Silver badge

        Re: Now hang on, please!

        "I have a laptop at the moment that refuses to boot ... in an infinite loop ..."

        Systemd sucks. It really, really, sucks. I mean I've never even seen anything that sucks so bad.

        Jeez it sucks.

        Systemd put my backup server into an infinite boot loop too, right after an 'apt-get upgrade'.

        God systemd sucks. I hate it with a passion.

        Please, somebody, please kill it.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like