Hack Crashes Linux Distros with a mere 48 Characters of Code

For discussions about security.
Post Reply
Message
Author
belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

Hack Crashes Linux Distros with a mere 48 Characters of Code

#1 Post by belham2 »

https://threatpost.com/hack-crashes-lin ... de/121052/

"Hack Crashes Linux Distros with 48 Characters of Code"
by Tom Spring
October 3, 2016 , 5:06 pm

With just a mere 48 characters of code, Linux admin and SSLMate founder Andrew Ayer has figured out how to crash major Linux distributions by locally exploiting a flaw in systemd.

Ayer said the following command, when run as any user, will crash systemd: NOTIFY_SOCKET=/run/systemd/notify systemd-notify “

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

David Strauss (systemd) sounds like a douche, he should be thanking Ayer for finding the bug.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#3 Post by rufwoof »

No different to a fork bomb. That command can be filtered out if you can't trust the main user ... dumb idea/concept purely for the purpose of (a poor attempt at) swaying a anti-systemd argument.

SysV crash in 14 characters (fork bomb) DON'T RUN IT!!

Code: Select all

:(){ :|: & };:
i.e. define a function that calls itself twice every time and invoke that function.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#4 Post by Scooby »

rufwoof wrote: ...
DON'T RUN IT!!
...
Ahhw, Don't say don't run it.

What is the first thing I did?

I ran it and yes my system got F***ed up.

The question is, Does it not F*** up systemd also?

I won't touch systemd even with a pair of thongs so I cannot
test it.

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#5 Post by belham2 »

Scooby wrote:
rufwoof wrote: ...
DON'T RUN IT!!
...
Ahhw, Don't say don't run it.

What is the first thing I did?
Lol, Scooby! Classic......we can't help ourselves :twisted:

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#6 Post by drunkjedi »

DebianDog has option to boot with systemd I believe.

You can test it there....

bark_bark_bark
Posts: 1885
Joined: Tue 05 Jun 2012, 12:17
Location: Wisconsin USA

#7 Post by bark_bark_bark »

Scooby wrote:I won't touch systemd even with a pair of thongs so I cannot
test it.
??

I don't get what you mean, since a thong is a type of underwear.
....

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#8 Post by Scooby »

Lost in translation, huh?

Alright so what would be the correct way to say it in English?

A pair of tongs? A pair of pliers?

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#9 Post by Scooby »

drunkjedi wrote:DebianDog has option to boot with systemd I believe.

You can test it there....
No I will not test with systemd, that is for someone else to try.

I rather wear thongs than grapple with systemd!

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#10 Post by Sailor Enceladus »

Scooby wrote:Lost in translation, huh?

Alright so what would be the correct way to say it in English?

A pair of tongs? A pair of pliers?
haha yes it's tongs. Don't you know the Thong Song?
drunkjedi wrote:DebianDog has option to boot with systemd I believe.

You can test it there....
I guess that would explain rufwoof's post. Is there a DevuanDog? (not that I see a good reason to use it over a Devuan Puppy)

bark_bark_bark
Posts: 1885
Joined: Tue 05 Jun 2012, 12:17
Location: Wisconsin USA

#11 Post by bark_bark_bark »

Scooby wrote: I rather wear thongs than grapple with systemd!
agreed.
....

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#12 Post by rufwoof »

I switched over from SysV DebianDog to SysD and the boot time more than halved. 28 seconds down to 12 seconds (using LZ4 compressed main sfs on a HDD frugal). That's despite SysD being a lot larger (strives to cater for all setups ... which IME it did/does well). With a common kernel and initrd it detects/boots well using common code (so more eyes fixing any issues there may be instead of everyone going off and doing their own thing).

There's still a initrd content that you can edit (do your own thing) but the 'proper way' is to leave that common (as-is) and write modules to drop in/execute when you want.

I also found that suspend worked much better, so now PC in suspend mode takes just 2 or 3 seconds to 'start up'.

My dislikes are the modules aren't intuitive. You have to define before and/or after values that unless you are familiar with what other things are doing can be awkward to determine. Things like before shutdown, halt, suspend are easy enough but others much less so. A cost of modularity.

I'm not bothered by the politics of the two, just picked what works best for me. I have tried Devuan (beta) but its in its infancy still ... a long way to go yet (Mammoth task to get up to the same level of support/development/documentation to compare to Debian).

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#13 Post by jamesbond »

@belham2:
I linked to the actual blog post of the person who found the bug in my post here: http://www.murga-linux.com/puppy/viewto ... 544#926544. It is worthwhile to read his full write-up to know the extent of the problem.

@rufwoof:
No different to a fork bomb. That command can be filtered out if you can't trust the main user ... dumb idea/concept purely for the purpose of (a poor attempt at) swaying a anti-systemd argument.
You're running as root so you are probably oblivious of the difference. When running as a root there are a lot of things you wreak havoc if you want to, fork bomb being the least of the problem.

For those who run "traditional" systems with root/non-root privilege separation, the difference between your idea, and the systemd bug is as like a spider and a spider-crab.

Here: Non-root users are not supposed to be able to crash the system, ever, period. Your fork bomb idea only works when you're root, because, on a traditional system, a non-root user can't write create a new initscript (either sysv ones or systemd ones). So your idea won't work as non-root.

The aforementioned systemd bug, however, can be triggered by a regular, non-root user. A non-root user can crash the whole system - I think that's a serious bug.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#14 Post by rufwoof »

jamesbond wrote:@belham2:
I linked to the actual blog post of the person who found the bug in my post here: http://www.murga-linux.com/puppy/viewto ... 544#926544. It is worthwhile to read his full write-up to know the extent of the problem.

@rufwoof:
No different to a fork bomb. That command can be filtered out if you can't trust the main user ... dumb idea/concept purely for the purpose of (a poor attempt at) swaying a anti-systemd argument.
You're running as root so you are probably oblivious of the difference. When running as a root there are a lot of things you wreak havoc if you want to, fork bomb being the least of the problem.

For those who run "traditional" systems with root/non-root privilege separation, the difference between your idea, and the systemd bug is as like a spider and a spider-crab.

Here: Non-root users are not supposed to be able to crash the system, ever, period. Your fork bomb idea only works when you're root, because, on a traditional system, a non-root user can't write create a new initscript (either sysv ones or systemd ones). So your idea won't work as non-root.

The aforementioned systemd bug, however, can be triggered by a regular, non-root user. A non-root user can crash the whole system - I think that's a serious bug.
That particular fork-bomb is a 'user' bomb. I've run in under systemd 'user' also to equal effect.

Debian have put out a fix to disable that systemd 'bug' ... simple disable it choice.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#15 Post by Scooby »

rufwoof wrote:I switched over from SysV DebianDog to SysD and the boot time more than halved. 28 seconds down to 12 seconds (using LZ4 compressed main sfs on a HDD frugal).
so to gain 14 seconds yo u have to bring on this behemoth and crush
all independence and modularity of the Linux eco-system.

So you can spend your valuable time on something more important
like facebook and pokemon go???

Post Reply