Submitted via IRC for TheMightyBuzzard
A bug in Linux's systemd init system causes root permissions to be given to services associated with invalid usernames, and while this could pose a security risk, exploitation is not an easy task.
A developer who uses the online moniker "mapleray" last week discovered a problem related to systemd unit files, the configuration files used to describe resources and their behavior. Mapleray noticed that a systemd unit file containing an invalid username – one that starts with a digit (e.g. "0day") – will initiate the targeted process with root privileges instead of regular user privileges.
Systemd is designed not to allow usernames that start with a numeric character, but Red Hat, CentOS and other Linux distributions do allow such usernames.
"It's systemd's parsing of the User= parameter that determines the naming doesn't follow a set of conventions, and decides to fall back to its default value, root," explained developer Mattias Geniar.
While this sounds like it could be leveraged to obtain root privileges on any Linux installation using systemd, exploiting the bug in an attack is not an easy task. Geniar pointed out that the attacker needs root privileges in the first place to edit the systemd unit file and use it.
[...] Systemd developers have classified this issue as "not-a-bug" and they apparently don't plan on fixing it. Linux users are divided on the matter – some believe this is a vulnerability that could pose a serious security risk, while others agree that a fix is not necessary.
See, this is why we can't have nice init systems.
Source: http://www.securityweek.com/linux-systemd-gives-root-privileges-invalid-usernames
(Score: 2, Interesting) by Anonymous Coward on Monday July 03 2017, @10:14PM (1 child)
Cut as much of it out of your life as possible.
(Score: 0, Offtopic) by Ethanol-fueled on Monday July 03 2017, @10:19PM
They knew better. That's why Trump was elected.
We have to drain the swamp.
(Score: 0) by Anonymous Coward on Monday July 03 2017, @10:20PM (3 children)
So how does this affect Tor [client only] users?
(Score: 1, Funny) by Anonymous Coward on Monday July 03 2017, @10:45PM
You should only use Tor on Win10 then.
(Score: 2) by kaszz on Tuesday July 04 2017, @02:50AM
Don't use systemd. Don't use systemd unit files if you do anyway. And if you fucked up anyway, make sure you can trust your support programs (deamons).
In other news, secret societies plan on removing the poettering bug with a flyswatt. It's the only way to be sure.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @05:01PM
why are you using tor?
(Score: 2) by requerdanos on Monday July 03 2017, @10:33PM (7 children)
If you have to already have root to potentially later get root, there are much easier ways to do it than this. A single suid binary, for example.
(Score: 5, Insightful) by The Mighty Buzzard on Tuesday July 04 2017, @01:48AM (5 children)
The problem isn't that someone could write a malicious unit file, it's that someone could typo "apahce" and your web server would end up running as root. Substitute your possibly exploitable daemon of choice for apache.
My rights don't end where your fear begins.
(Score: 4, Informative) by jimshatt on Tuesday July 04 2017, @07:29AM (4 children)
To rehash your explanation: this isn't an attack vector in itself, because you'd need root to create a malicious init file, but a minor bug in a misconfigured daemon can now suddenly be a gaping security hole.
(Score: 2) by The Mighty Buzzard on Tuesday July 04 2017, @10:24AM (2 children)
Cheers for the correction.
My rights don't end where your fear begins.
(Score: 2) by Justin Case on Wednesday July 05 2017, @05:47PM (1 child)
Fucking brilliant new signature! I might borrow it if you get tired of it someday.
(Score: 2) by The Mighty Buzzard on Wednesday July 05 2017, @05:55PM
Go for it. Just remember I stole it first.
My rights don't end where your fear begins.
(Score: 1, Informative) by Anonymous Coward on Tuesday July 04 2017, @10:30AM
It's not related to starting with a numeric character, it's any invalid (in systemd's view) username, including typos such as apaché.
The problem with usernames starting with a digit is that those are actually VALID usernames in a posix system, but systemd does not consider them valid. So the fully valid username 0access get root access instead.
So it's actually two bugs - the security hole that regards any invalid username as root, and the bug that treats any username that starts with a digit as invalid.
(Score: 1) by Deeo Kain on Tuesday July 04 2017, @09:32PM
SUID binaries are too easy to spot. Every hardening package searches and neutralizes them.
(Score: 5, Insightful) by Justin Case on Monday July 03 2017, @10:33PM (19 children)
"default value, root" pretty much explains everything that is defective in the brains of those behind systemd. Maybe it is not an easily exploitable bug (for now). But it is a cognitive bug that can only be fixed by replacing the people who think this is OK. Or, you know, by ignoring them and letting them spiral down to their own doom without me along for the ride.
I recently tried Devuan 1.0 on my laptop. Aside from some minor installation bumps (similar to what others have reported) it is wonderful. Familiar and powerful Debian without the crap. I plan to convert my entire network when I can.
(Score: 0) by Anonymous Coward on Monday July 03 2017, @11:18PM
What do you mean? If you are devious and screw up a lot you gain power and privilege. That is exactly how the world works!
(Score: 2) by MichaelDavidCrawford on Monday July 03 2017, @11:40PM
Software failure is fundamentally a human problem, not a technical one. Purely technical solutions fail to effect truly meaningful and lasting change. [warplife.com]
Yes I Have No Bananas. [gofundme.com]
(Score: 5, Insightful) by fido_dogstoyevsky on Monday July 03 2017, @11:57PM (12 children)
It only explains half that is defective. My son keeps telling me "don't ascribe to malice anything easily explained as incompetence" and "default value, root" is incompetence. As opposed to "make it big, all devouring and a moving target so that it's almost impossible to just replace", which is malice.
I'm glad to see Devuan succeeding since Debian (Potato) was one of the first distros I tried.
It's NOT a conspiracy... it's a plot.
(Score: 5, Insightful) by vux984 on Tuesday July 04 2017, @12:56AM (4 children)
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:09AM
Whenever I've taken the time to report a problem with any open-source project, it gets ignored and then closed without any action taken. So this "wont-fix" is just the default, not necessarily anything to do with this specific bug.
(Score: 2) by turgid on Tuesday July 04 2017, @10:12AM (2 children)
Perhaps systemd is written by the people from the B Ark. I wonder if they've decided what colour it should be yet?
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:06PM (1 child)
The poor sanitary practices are reminiscent of those who stayed behind.
(Score: 0) by Anonymous Coward on Wednesday July 05 2017, @01:43PM
Are you suggesting a lush poopoo brown?
(Score: 2) by kaszz on Tuesday July 04 2017, @02:55AM
Worse than incompetence which usually can be cured with education. This is as another one put it cognitive inability and which explains why experience hasn't cured this. This instance of carbon based life form is defect and needs urgent removal from influencing important operations.
(Score: 2, Funny) by khallow on Tuesday July 04 2017, @03:44AM (5 children)
(Score: 2) by mcgrew on Tuesday July 04 2017, @05:31PM (4 children)
Original source of that quote: me. Glad to see it being used!
Poe's Law [nooze.org] has nothing to do with Edgar Allen Poetry
(Score: 1) by khallow on Wednesday July 05 2017, @04:36AM (3 children)
(Score: 2) by mcgrew on Wednesday July 05 2017, @02:48PM (2 children)
That was shortly after I said it, and yes, it was on slashdot. I call it "mcgrew's razor" although I should probably misspell "mcgrew", because Hanlon's Razor is allegedly from a Robert Heinlein story.
Poe's Law [nooze.org] has nothing to do with Edgar Allen Poetry
(Score: 1) by khallow on Friday July 07 2017, @03:40AM (1 child)
(Score: 2) by mcgrew on Friday July 07 2017, @03:53PM
Yes, that's certainly possible.
Poe's Law [nooze.org] has nothing to do with Edgar Allen Poetry
(Score: 2) by Runaway1956 on Tuesday July 04 2017, @07:00AM
+4 insightful already, and I'll add one to it. Defaulting to root is about as stupid as stupid gets, FFS.
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:03AM
This is not a bug, it is a requirement of a certain TLA.
(Score: 5, Insightful) by maxwell demon on Tuesday July 04 2017, @08:14AM (1 child)
Actually, you already get a whole bunch of failures when quoting the complete sentence:
This is wrong in the following ways:
So the whole issue is stacking three terrible decisions on top of each other.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @03:17PM
Came here to say the exact same thing!
(Score: 3, Disagree) by mendax on Monday July 03 2017, @10:44PM (10 children)
It is a common practice that bugs that are of little risk never get fixed. No one ever said that good software has to be perfect. Now, of course, I'm not passing judgment on the value or quality of systemd. Leave me out of that nonsense!!!
It's really quite a simple choice: Life, Death, or Los Angeles.
(Score: 4, Touché) by Nerdfest on Monday July 03 2017, @11:00PM
Part of the interest in this one is that Poettering was being his usual douchey self again on GitHub.
(Score: 4, Interesting) by julian on Tuesday July 04 2017, @02:48AM (8 children)
No one ever said that good math has to be perfect.
...wait, yes they do. Everyone says that. We can either start thinking of software as math, which it is, or we will have to live with these bugs forever--which is increasingly expensive not just in money but in human lives. We have the concept of provable correctness, we don't deploy it because software "engineers" are not legally responsible for their failures, unlike real engineers.
Yes, it's enormously expensive to produce something as complex as an operating system or a browser that meets such standards. It also costs tens of millions NOT to do this. That's today. It looks like humanity is only going to become more dependent on software and networks so the cost will only increase.
If we cared about bug-free code and side-effect free code we could work on making that easier to produce. Our economy is tooled to produce huge amounts of cheap crap that can be quickly brought to market and then obsoleted to make room for the next wave of cheap crap.
Hazard a guess how long that can keep going? Even saying 50 years oughts you as a naive optimist. And that's not that long. I'll only be in my 70s--still bitching about this when a new firmware bug in the latest model of molecular printer allows hackers to commandeer the device and spew super-ebola into thousands of homes throughout the world.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @06:44AM (6 children)
hold on. is it even possible to demand that an operating system is proven to be bug free?
I mean... since we know that we can write algorithms who's behavior versus their input is undecidable, and the operating system is supposed to allow that algorithm to run, how much can we prove about the behavior of the operating system?
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:11AM
We will make the BEST software. Beautiful software. You'll love it so much, you don't even know. That's the level of code quality we should aspire to.
(Score: 3, Touché) by maxwell demon on Tuesday July 04 2017, @08:18AM
Bug free? Probably not. Free of terrible design decisions? Definitely.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by fido_dogstoyevsky on Tuesday July 04 2017, @12:41PM (2 children)
Of course - just demand it, politicians and PHBs do the equivalent all the time :)
We can't prove that something will always work properly. But if a potential problem is identified then it needs to be treated like a real problem. If an engineer is warned that the steel they're using in a bridge is grossly undersized would "not-a-bug" be an adequate reply?*
*Not that it would happen very often - real engineers understand about being responsible for their work.
It's NOT a conspiracy... it's a plot.
(Score: 3, Interesting) by mcgrew on Tuesday July 04 2017, @05:33PM (1 child)
Measure with a micrometer, mark with chalk and cut with a chain saw.
Poe's Law [nooze.org] has nothing to do with Edgar Allen Poetry
(Score: 2) by fido_dogstoyevsky on Tuesday July 04 2017, @11:20PM
Want to moderate, but stuck between "funny" and "informative" (at least that's how I work wood).
It's NOT a conspiracy... it's a plot.
(Score: 0) by Anonymous Coward on Friday July 07 2017, @03:13AM
The L4.verified project [csiro.au]
(Score: 2) by Runaway1956 on Tuesday July 04 2017, @07:09AM
I'm not so sure about all of that. Software is not precisely math, but an expression of things we want to do with it. Yeah, you can get a lot of your algorithms to work perfectly, and that's cool and all, but what if the algorithm doesn't do exactly what you wanted it to do? Then you tweak on it, changing the way it does things to more closely match what you wanted to do. That might be cool, but now you have a less than perfect algorithm. Throw it out? Go back to perfect? What good is perfect, if you can't get what you need from it?
I think you need perfect people before you can get perfect software - and that ain't happening!
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 0) by Anonymous Coward on Monday July 03 2017, @11:36PM
I wonder how much it will take to transform one-true-systemd into a fragmented conglomerate of patches applied by different distributions to make it functional.
(Score: 2) by Arik on Monday July 03 2017, @11:43PM (26 children)
BUT
This is "not a bug" because you aren't allowed to edit the file and add the username, unless you're already root?
See I read TFA.
But I'm still not sure I get this. How does a username normally get written into one of these 'unit files' in the first place?
If laughter is the best medicine, who are the best doctors?
(Score: 2) by unauthorized on Tuesday July 04 2017, @12:29AM (12 children)
Unit files are usually hand-written files installed along with the distribution or a package. In the typical use-case they only change with package updates unless an admin manually edits them.
(Score: 3, Interesting) by Arik on Tuesday July 04 2017, @12:53AM (11 children)
But how do they figure it's not a bug? Is there any conceivable, theoretical case where this behavior is expected and desired?
If laughter is the best medicine, who are the best doctors?
(Score: 5, Insightful) by vux984 on Tuesday July 04 2017, @01:02AM (5 children)
This Exactly.
Throw/log an error and don't start the process should be the default behavior. Starting as root if the user name is invalid is beyond the pale.
(Score: 2) by kaszz on Tuesday July 04 2017, @02:59AM (1 child)
No log as it binary.. remember? total clusterfuck. Shit like this is what forces administrators to do late nighter to clean up after the braindamage writes code that scriptkids use. (which usually some pointy haired type decided must be used..)
(Score: 2) by butthurt on Tuesday July 04 2017, @08:57PM
> No log as it binary.. remember?
The binary "journal" is a log.
(Score: 2) by SDRefugee on Tuesday July 04 2017, @01:06PM (1 child)
Sounds like something that bunch of psychos in Redmond, Washington would do...
America should be proud of Edward Snowden, the hero, whether they know it or not..
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:48PM
Software requirements specification met!
(Score: 2) by Thexalon on Tuesday July 04 2017, @07:51PM
At the very least, if I were going to default to anything at all, I'd default to "nobody".
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 3, Interesting) by Jesus_666 on Tuesday July 04 2017, @05:13PM (3 children)
Simple: The observed behavior is in line with how systemd was designed and therefore obviously correct. Since usernames can't begin with a digit and every major Linux distribution has been breaking the standard for years before it was even conceived it's not systemd's problem but that of everyone else. The fix to that problem is obvious: All distros should ban numeric usernames immediately (this is security-relevant, after all) and everyone who uses them should rename the offending users before installing any package updates. Also, they should be ashamed of themselves for being bad at Unix.
At least that's how I imagine the systemd team sees it.
(Score: 2) by vux984 on Tuesday July 04 2017, @06:20PM (2 children)
Probably. But EVEN if that's how they see it they STILL have a bug.
If the systemd team wants to enforce a policy of no usernames that start with a digit, fine, that would be in keeping with their arrogance and ego... but at the very least they should properly reject those credentials as invalid.
The failure mode for attempting to run a process with "invalid" credentials should NEVER be "run it as root".
(Score: 3, Touché) by maxwell demon on Tuesday July 04 2017, @06:43PM (1 child)
Nah, if Poettering implements this that way, it's obviously exactly the right thing. To follow his lead, I'm going to patch login with the following code:
SCNR :-)
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by DECbot on Wednesday July 05 2017, @04:40PM
I understand it to be a little more complex than that...
cats~$ sudo chown -R us /home/base
(Score: 3, Interesting) by FatPhil on Wednesday July 05 2017, @08:03AM
OK it requires social engineering to get people to install/try/uninstall, but still, I'd put that as a "fix right now" kind of bug. The brute force "unrecognised user name" = "don't run" solution sounds (a) like a fix to the bug; and (b) like what would have been the sensible default in the first place. If that's more than a trivial 10 line change to the code (I can barely imagine it being more than 3), then it's a code base that needs nuking from orbit.
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by frojack on Tuesday July 04 2017, @01:21AM (12 children)
No, that's not what happens here.
Using an invalid username causes that unit to run as root. That unit can do anything.
Using a valid user name causes that unit to run as that (valid) user. The unit can't do anything the user couldn't do.
Only root can instantiate a new unit.
No, you are mistaken. I've always had this sig.
(Score: 3, Disagree) by Arik on Tuesday July 04 2017, @01:32AM (9 children)
If laughter is the best medicine, who are the best doctors?
(Score: 2) by isostatic on Tuesday July 04 2017, @02:20PM (3 children)
no one gives a fsck what Poettering thinks, it's simply not his call
Sadly that's not true. I don't know why, but for some reason what he decides goes. Time and time again he causes a horrendous mess, and time and time again we follow him. He has an obscene amount of power - on the order of that of Linus. What he says goes, that's the new reality.
(Score: 1) by Arik on Tuesday July 04 2017, @02:51PM (2 children)
Not even the distro he works for actually considers these filenames invalid.
If laughter is the best medicine, who are the best doctors?
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @02:53PM
(Score: 2) by isostatic on Tuesday July 04 2017, @06:51PM
Sure, but that's effectively changed now. As systemd is so ingrained into linux, and pottering is in charge, if he decides that "usernames beginging with a number aren't valid", that makes them defacto invalid.
Technically you're correct, but in practice mroe and more of systemd will refuse to work with usernames begining with numbers, and it will become the defacto standard.
(Score: 2) by butthurt on Tuesday July 04 2017, @08:23PM (4 children)
> There's nothing 'invalid' about a *nix username starting with a null and many, many have done so.
I disagree. A commenter on Stack Exchange wrote that the allowable characters (according to IEEE Std 1003.1-2001) are:
-- https://www.linuxquestions.org/questions/linux-server-73/valid-user-names-573768/ [linuxquestions.org]
The summary mentions "usernames that start with a numeric character." A null character is not a numeric character. It's a control character. Perhaps you're confusing it with the zero symbol, "0"?
https://en.wikipedia.org/wiki/Null_character [wikipedia.org]
(Score: 1) by Arik on Wednesday July 05 2017, @12:27AM (3 children)
If laughter is the best medicine, who are the best doctors?
(Score: 2) by FatPhil on Wednesday July 05 2017, @08:06AM (1 child)
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 1) by Arik on Wednesday July 05 2017, @05:23PM
If laughter is the best medicine, who are the best doctors?
(Score: 2) by butthurt on Thursday July 06 2017, @12:37AM
In the context of character sets in computing, they have distinct meanings. In the character set used for POSIX usernames, a printable "0" is different from the non-printable NUL.
https://en.wikipedia.org/wiki/File:US-ASCII_code_chart.png [wikipedia.org]
If you refer to "0" as a null, you're just going to cause confusion.
(Score: 2, Informative) by Anonymous Coward on Tuesday July 04 2017, @01:38AM
This is false. If the username is "1strike" it is a valid Linux username but not to systemd so it gets root privileges. If the username is invalid, or starts with a number (which systemd says is bad), it runs as root.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @01:41AM
You are wrong. From the article:
Perfectly *valid* usernames ("0day") are *invalid* in crappyd. Yet another case of Poopering and his cronies getting things wrong and failing to support perfectly legal semantics. The rest of the system doesn't care if your username starts with a digit but somehow systemd does care.
(Score: 0) by Anonymous Coward on Monday July 03 2017, @11:50PM (3 children)
Hurd has a concept of unprivileged user sort of like Unix 'nobody' except the unprivileged user has an empty user id.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @10:36AM (2 children)
The user "nobody" is not an unprivileged user. It's a terribly named user with only access to Apache / wwwroot, and should not be used for anything else.
The user "nobody" should really be named "apache".
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @08:31PM
You know there are boxes that don't run a webserver? Of course you don't.
Full stack!
Full stack!
Full stack!
Chant with me, moron.
(Score: 1) by Deeo Kain on Tuesday July 04 2017, @09:42PM
Wrong. RedHat uses user httpd for the web server processes, Debian uses www.data. User nobody really is nobody.
(Score: 5, Interesting) by Azuma Hazuki on Monday July 03 2017, @11:59PM (7 children)
Okay why the FUCK would an undefined value like this ever, EVER default to root?! Is it something like "assume 0 if no value" and 0 happens to be the root id, or what?
I don't agree that this is a small bug; for the sake of simple correctness and minimizing your attack surface, fix it! Just add a check for invalid values, and if it finds one default to nobody or even, hell, create a new user just for this case that can only ever do something like display "You have an error in your unit file" message.
But for fuck's sake, the answer to "There's nothing here, what do I do?" should never, ever be "r00t lol"
I am "that girl" your mother warned you about...
(Score: 2) by frojack on Tuesday July 04 2017, @01:25AM (6 children)
Lazy developers of systemd is my guess. They didn't want to have to have a user = clause in every friggin unit.
They started developing things for an init that runs system things, and only later added the ability to start tasks for user, like timers, cronjobs, set. They were too lazy to go back and put in the requirement that all units have a user clause. And too proud to admit they didn't think that far ahead.
No, you are mistaken. I've always had this sig.
(Score: 2) by Azuma Hazuki on Tuesday July 04 2017, @02:00AM (3 children)
Screw this. I found an Arch-OpenRC iso and am going to install that, and if systemd ever becomes part of the kernel either literally or de facto, I'm moving onto *BSD.
The links below mentioning the politics of Poettering-itis are eye-opening and sobering, and *once again* we can't have nice things because greed. Perkele!
I am "that girl" your mother warned you about...
(Score: 4, Insightful) by Thexalon on Tuesday July 04 2017, @02:09AM (2 children)
Slackware, Devuan, and Gentoo are all options for distros that have stayed mercifully free of Poettering's persistent pitfalls.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @02:22PM (1 child)
Well...they do all have pulseaudio by default at this point. But he's been off the project long enough now that it's not as bad as it was for a long time. Doesn't necessarily mean the Slackware community is all too pleased about it.
(Score: 0) by Anonymous Coward on Saturday July 15 2017, @03:31PM
Mostly because Bluez have decided to hard depend on PA for their audio IO needs...
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @10:26AM
Even then, having "User = " is different from not having an "User =" clause at all. While defaulting no user line to root is a bad idea, defaulting an *invalid* user line to root is a terrible idea.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @10:42AM
That's doesn't explain it. We are not talking about the case of no user= clause, we are talking about the user= clause exists, but the value is not acceptable to systemd.
Which makes it even worse, because what's acceptable to systemd is not the same as what's acceptable to the rest of the system. You can have a completely valid user named 0day, and if the admin doesn't know that this user is not acceptable to systemd, he will put the user name in the user= clause just as he would any other valid user. But because systemd doesn't follow any standards, and considers 0day an invalid user name, AND systemd is apparently written by someone who considers ON ERROR RESUME NEXT to be a fully valid way to write code, we end up with root even though a different user was specified.
Allowing the valid username "0day" would be a better solution. Declaring the unit file broken and refusing to start the service would be a better solution.
From a security point of view, even crashing the system would be a better solution.
(Score: 5, Informative) by Anonymous Coward on Tuesday July 04 2017, @01:47AM (30 children)
Excuse me linking to that green place, but ACs there nailed the core of the problem, of which this bug is just another symptom:
https://it.slashdot.org/comments.pl?sid=10813029&cid=54733511 [slashdot.org]
https://it.slashdot.org/comments.pl?sid=10813029&cid=54733623 [slashdot.org]
https://it.slashdot.org/comments.pl?sid=10813029&cid=54733449 [slashdot.org]
Long live to the resistance: BSDs, Gentoo, Devuan, Slackware and any other small or big FOSS project not bending over to the power games.
(Score: 2) by Azuma Hazuki on Tuesday July 04 2017, @02:02AM
Modded up and thank you for linking this. It's eye-opening, in the way that sitting on a cactus is, and about as painful.
Dammit all, greed turns everything into its slaves, like Jabba the Hutt with a million undressed Princess Leias on chains made of stock options.
I am "that girl" your mother warned you about...
(Score: 2) by Thexalon on Tuesday July 04 2017, @02:24AM (8 children)
I'll put it this way: It's always been clear to me that whatever Poettering's motivations, they weren't technical in nature. If they had been technical in nature, he wouldn't have gone out of his way to make his stuff not work with what already existed.
Take logging, for instance. Let's say I wanted to introduce a new binary logging format for some reason, that I wanted all system-level software to use. Should I:
A. Write something that (1) is a drop-in compatible replacement with existing widely-used logging tools like good old syslog that converts the input to the binary format and writes that to the file, (2) converts that binary file into the text formats we all know already with vim plugins and such so we inflict as little pain as possible on existing log-processing tools, and (3) has additional bells and whistles and gongs that makes this conversion all worth it.
B. Write something that uses a different kind of interface than all of the existing tools use, and demand that every daemon be changed to do things my way.
Poettering took option B, and there was no obvious technical reason for him doing so.
One other aspect of this particular bug that jumps out at me is that Poettering seems to be indifferent at best towards the concept of a "user" in Posix-based systems: He doesn't believe in sudo, su, or any similar kinds of tools. If you don't have the concept of user-based privileges, then privilege escalation bugs don't seem like a big deal, I guess. My guess is he runs his own boxes as root, which is why he doesn't notice the issues that causes or the reasons why not giving everybody root is a very good idea.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 2) by Azuma Hazuki on Tuesday July 04 2017, @02:27AM (4 children)
It occurs to me that Poettering's approach is basically how a Windows user would have written Linux programs. That is not a nice thought.
I am "that girl" your mother warned you about...
(Score: 2) by Thexalon on Tuesday July 04 2017, @02:31AM (1 child)
FTFY. After that point, Windows had concepts like users, privileges & permissions, and a whole lot of other very useful concepts that Unix had had for decades, but Poettering doesn't seem to care for.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @05:49AM
That may be true, but I still have to run (¹allegedly) current commercial code on Win7 boxes which requires admin rights to work, try them as normal user? all sorts of weird BS happens or it just fails to run.
I still occasionally get 'bitten' by this BS with the occasional weird edge-case 'works-as-admin-but-not-as-user' snafus with Windows software, and we're not talking about just 'cheap' software having this problem, one of our expensive CAM packages has only just (just, in this case being in the past two years) gotten to the point where it no longer requires to be run as an admin user to work properly and it now runs without issue as a normal user, whereas, in the past, running it as a normal user meant that it might work 90% of the time, but then horribly fail on some operations...
The point is, while Windows does 'understand' these concepts, there's a hell of a lot of reused Windows code which doesn't, and programmers out there who still don't.
He is, indeed one of the Knights who say NIH!
¹ I say 'allegedly', I'm of the opinion that the code is exactly the same and only the version number has been changed just to make it look as if the damnable thing is still being developed..
(Score: 2) by Runaway1956 on Tuesday July 04 2017, @07:26AM (1 child)
Mmmm. That's scary to even think about. Your Windows user is likely to import DLL files for use as libraries. And, Microsoft would probably let him get away with it because embrace, extend, extinguish. Never mind that DLL's wreck anything or everything in existing libraries.
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 2) by Azuma Hazuki on Tuesday July 04 2017, @07:53AM
A DLL is the Windows equivalent of a .so and in theory should be no more or less harmful all else being equal. We're long past "DLL Hell" aren't we? Now the problem is what's *in* the .dll files...this Linux Subsystem for Windows isn't even a solution looking for a problem, it's a shambling undead mess given an assassination mission.
I am "that girl" your mother warned you about...
(Score: 2) by kaszz on Tuesday July 04 2017, @03:13AM
Found another good post:
https://it.slashdot.org/comments.pl?sid=10813029&cid=54733555 [slashdot.org]
(Score: 1, Interesting) by Anonymous Coward on Tuesday July 04 2017, @03:16AM (1 child)
Text logs are fine, just add another file with pointers or any other helper metadata new tools can need. Similar to BSD vipw and pwd_mkdb handling and checking text and binary files so they always valid, easily "grepable" (text ones) or fast via API/ABI (bin ones), in sync and simple to recover if something goes wrong.
Bonus: the text log files can be set to append only (see chattr(1)). Then set owner to something except the logger process, and the group to logger process so it can
writeappend. Magic: now modification or deletion of past logs needs root or whatever owner the file has, so comprossing the logger is not enough.But you know, defense in depth is hard to grok. Another level would be shipping copies of logs to a different machine, and both local and remote would still use this append-only trick. But for standalone machines the append-only method would be an improvement.
(Score: 2) by Thexalon on Tuesday July 04 2017, @05:27PM
The point is, even if you accept that journald is useful (an open question), they're doing it wrong.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 2, Troll) by unauthorized on Tuesday July 04 2017, @02:50AM (12 children)
My experience is exactly the opposite. As a non-admin, the only arguments against systemd I regularly see are "muh unix philosophy", "it's a corporate conspiracy", "ZOMG binary logs", "it's the established truth so shut up" and "LP sucks balls".
Incidentally, the AC comment you link falls within these categories.
(Score: 4, Insightful) by Azuma Hazuki on Tuesday July 04 2017, @02:54AM (1 child)
They're not wrong though, and as someone who *does* do admin stuff (though nothing that involves fucking around with unit files or shell scripts), I can tell you I *really* do not like the systemd way. It almost feels like Powershell, which I hate with all my heart, and it has the same corporate "not for you to know, skeptic!" attitude to it as Windows, almost.
OpenRC works. It solves the issues in SysVInit which, yes, had problems. SystemD isn't a bad idea in theory but its practical realization is a disaster.
I am "that girl" your mother warned you about...
(Score: 4, Informative) by digitalaudiorock on Tuesday July 04 2017, @02:39PM
I'd say it's way more than almost, from the binary logs to the whole "nothing simple can ever be good" mindset it seems indistinguishable from the Windows approach to everything. Check out this [dns-oarc.net] regarding how systemd-resolved handles DNS queries:
How do they not see the potential to send your computer back to like 1990 due to slow DNS response? No reason to be concerned with, you know writing things that "work" "well". There seems to be an actual disdane for the simple an elegant frankly.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @03:23AM (6 children)
You must have missed all the technical analysis posted when systemd started to push around.
I will mention just one: monoculture. That creates a stagnant enviroment, and when the issues hit, everything falls down. Now try to justify how a systemd monoculture is great.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @05:06AM (5 children)
Linux is a monoculture. Look at AIX, the BSDs, macOS, QNX, Solaris, all have their own kernels. But every Linux distribution uses the Linux kernel.
You want to accuse systemd of being an init monoculture when Linux already is a kernel monoculture.
(Score: 2, Insightful) by Runaway1956 on Tuesday July 04 2017, @07:33AM (4 children)
"every Linux distribution uses the Linux kernel"
No, not exactly. I run the Liquorix kernel most of the time. You're going to argue that Liquorix is just the Linux kernel with some crap tweaked. And, that, in and of itself, makes it different. Whichever kernel I am running, it doesn't behave precisely like the kernal that Linus uses on his machines. My kernel has different compile flags from anyone else, I can enable or disable security features, I can leave out features that I consider to be irrelevant or insecure. Just change a few use flags, and your kernel is quite different from any other kernel in the world.
If you said that "most Linux distributions use the Linux kernel", you would be much closer to correct. Maybe you should download all the distros, and compare their kernels. Most will be alike, but not all. And, again, just because I'm using a distro, doesn't mean that I'm using the kernel that was packaged with it.
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @06:37PM (1 child)
^ found the Technical Thug
If you're going to argue that you don't have a monoculture because you can hack your kernel, then you can hack systemd also. The premise in the subject line is invalid, and the topic of discussion is moot.
Don't like how systemd Gives Root Privileges to Invalid Usernames? Fix it yourself, Thug!
(Score: 2) by Runaway1956 on Wednesday July 05 2017, @12:08AM
The argument against systemd seems to run more along the lines, "systemd is, in and of itself a hack, and a solution searching for a problem that doesn't exist". I'm not really on either side of that argument. I'm the eternal skeptic, who saw little need for systemd, but was willing to give it a try. But I keep hearing more and more arguments against systemd that make sense. Now, we have a potential security flaw that makes systemd even less appealing.
Further, there are a number of posts that indicate that systemd is more of a political solution to corporate problems, than it is a software solution to init problems.
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 3, Touché) by gidds on Tuesday July 04 2017, @08:45PM (1 child)
If you're not running the Linux kernel, how can it be a Linux distribution??
[sig redacted]
(Score: 3, Interesting) by Runaway1956 on Wednesday July 05 2017, @12:02AM
Alright. I thought, "Fair question." Then, I thought, "No, actually, that's not just a fair question, it's a good question."
I guess I'm comparing Linux to Windows, which is a true monoculture. You take whatever Microsoft offers, and that's it. And, Microsoft intends for everyone to upgrade to Windows 10, and all older kernels and versions are to just die off. Proprietary is proprietary, and that side of the computing world is as monoculture as possible.
With Linux, many tweaks are documented. You can compile your kernel to be as mathematically precise as humanly possible, or you can compile it with much looser parameters. Linus and his people do, as you suggest, develop in a path, with a vision, and the Linux world mostly follows along. A quick search you may find interesting, or not - https://duckduckgo.com/?q=is+linux+a+monoculture%3F&atb=v63-6__&ia=web [duckduckgo.com]
The thing about the Linux community, is that a heretic can openly distribute whatever hacks he has made to Linus' kernel. There are no secretive forums, operating under threat of discovery by Linus and a horde of lawyers. A developer can claim to have created a "Better Linux Kernel", and flaunt his work openly, for all the world to see, and use. https://liquorix.net/ [liquorix.net]
And, it hasn't taken me very long to alter my own viewpoint a little. Doing a quick search comparing BSD kernels to Linux kernels leads to several discussions - I'll just throw the search out here, and you may dive in, or not, as you wish - https://duckduckgo.com/?q=BSD+vs+Linux+kernel&atb=v63-6__&ia=qa [duckduckgo.com]
You may make an argument that all Unix-like kernels are part of a monoculture, I suppose. With Unix, Ma Bell created a pretty damned good operating system. And, all of the "best" OS's tend to emulate Unix. You tell me - does that make it a monoculture, or not?
“I have become friends with many school shooters” - Tampon Tim Walz
(Score: 2, Insightful) by Anonymous Coward on Tuesday July 04 2017, @04:02AM
Fine, as not-mechanic, you have no issue with mechanics having to dissassemble the full engine to check a small filter. It's cheap anyway.
High logic there, the issue doesn't affect you directly, then it doesn't matter for anyone (like mechanics that like to be preventive), or even you down the road. Good luck when the fucking filter clogs and you get a huge bill because that cheap part failing cascades into more parts going bad and the engine needs a full replacement. Or the engine fails and you get run over (just in case anybody wants to play the "I don't own a car" card).
You say that just as WannaCry, and family, is hitting multiple Windows versions all over the world. Monoculture sucks. Stupid complex design sucks. Hidding problems sucks. Decades of multiple OSes, but specially old UNIX, BSD (wars) and (the birth of) Linux have proved it. Starting by the propiertary ones, inlcuding those that provided source but didn't allow changes. Which is just what the comments about talk about, RH gives you the source but good luck changing it the cryptic mess.
(Score: 1) by khallow on Tuesday July 04 2017, @12:01PM
(Score: 2) by Thexalon on Tuesday July 04 2017, @05:57PM
The argument amounts to: After all this effort, what's been accomplished is replacing possibly-complex shell scripts that work with really complex C that doesn't always work.
For example, I have rendered a systemd-based box unbootable by unplugging the USB mouse that it expected to have. That isn't the correct behavior: The correct behavior, which other init systems do just fine, is to bring up the box with everything but the mouse, at which point I can do something useful.
And the "LP sucks" arguments have to do with a repeated pattern of serious and significant bug reports getting a routine response of "WONTFIX - not a bug". On critical system software, that is unacceptable.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 3, Informative) by kaszz on Tuesday July 04 2017, @03:18AM
Aha so it's Oracle vs Red Hat that is behind this.
Oracle has already been noted for being deceptive assholes in areas completely unrelated to Linux. So this stinks a long way.
Please... please.. make your software if( environment == Oracle or RedHat ) then die("Fucking shit");
(Score: 2) by Snospar on Tuesday July 04 2017, @07:47AM (5 children)
I still don't understand why Debian, and others, were so quick to jump on the Red Hat bandwagon and make the change to systemd. They've pulled a huge number of distros into this corporate fight where I thought that one of Linux strengths was the diversity of distros and in the case of Debian the democracy of large numbers of developers making reasoned choices. From a long term Debian users point of view they seemed to dive into systemd before it was even ready for prime time (I remember various supporting tools weren't even present when they first jumped). I still don't know WHY Debian would behave like that - they don't have Oracle pissing on their chips.
Huge thanks to all the Soylent volunteers without whom this community (and this post) would not be possible.
(Score: 2) by Azuma Hazuki on Tuesday July 04 2017, @07:58AM (2 children)
You and me both. I had high hopes, early on, that Debian would provide a sort of anti-RHEL bulwark and be a major force for non-systemd Linux. Essentially, I was hoping they'd rally the rest of the Linux world behind them and then everyone would say in a very loud voice "Okay RedHat, you do your thing, and certify your users on it, but that's YOUR thing."
Instead, their capitulation essentially gave over almost the entire Linux world to the RHEL way. I am almost maudlin-grateful for Gentoo, Devuan, Slackware, and the shiny new Arch-OpenRC ISO and repo on Sourceforge which I just finished installing not 2 hours ago.
Unfortunately, with Debian gone this way, *buntu and Mint are also inevitably being dragged along. I really do think Linux as we all knew it died with systemd, and all to fuel RHEL and Oracle's dick-measuring contest it seems.
And the worst part is, taken in vacuum, *that makes the systemd crew the good guys by comparison.* Arrrrgh.
I am "that girl" your mother warned you about...
(Score: 2) by Snospar on Tuesday July 04 2017, @08:20AM
I'm really hoping that Devuan gathers momentum and becomes a great success. Naive perhaps, but if they can keep fighting the systemd contagion as it touches more and more aspects of Linux then hopefully more users and developers will start to switch over. Who knows, maybe we will see *buntu or Mint based on Devuan in the future!
I know we have Gentoo, Arch, Slackware, etc that have managed to stay systemd-free but there are many who are very comfortable with the Debian way.
Huge thanks to all the Soylent volunteers without whom this community (and this post) would not be possible.
(Score: 1) by pTamok on Tuesday July 04 2017, @12:23PM
I too "had high hopes, early on, that Debian would provide a sort of anti-RHEL bulwark and be a major force for non-systemd Linux".
I was very wrong.
I don't know if Devuan has the scale needed. I hope it has, but the early signs are not good.
(Score: 0) by Anonymous Coward on Tuesday July 04 2017, @04:53PM
They wanted to ship Gnome as the default desktop.
Gnome depends on systemd-logind unless you want to patch to shim, and one can just ask Canonical how well that works.
systemd-logind in turn depends on systemd-pid1 to handle all things cgroups.
Basically Debian, for all its presence in the Linux community, do not have the manpower to go up against the code churn of Fedora/Red Hat.
End result is that these days whatever goes into Fedora eventually ends up being the de-facto standard for the Linux ecosystem.
(Score: 2) by Thexalon on Tuesday July 04 2017, @06:03PM
1. Because the pro-systemd people gamed the vote quite intentionally.
2. Poettering & friends were and still are deliberately breaking otherwise working userspace software to make systemd appear to be more and more a requirement for a Linux system, to the point that Gentoo and other anti-systemd distros have to patch things to not require it.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.