Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd

2019-05-25 Thread Olaf Meeuwissen via Dng
Hi,

Rick Moen writes:

> Quoting Martin Steigerwald (mar...@lichtvoll.de):
>
> [...]
>> While sending SIGKILL to Systemd did not have any effect, sending SIGILL
>> – illegal instruction – to it brought the machine to an halt. I
>> reproduced it with
>>
>> while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
> [...]
>
> OMG, that's both sad and hilarious.
>
> The jokes about systemd being ILL almost tell themselves.

And the systemd fan-folk will be complaining about ILL will, no doubt.
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Softwarehttps://my.fsf.org/donate
 Join the Free Software Foundation  https://my.fsf.org/join
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd

2019-05-24 Thread dev via Dng
Hi Martin,
Perhaps Proxmox could ship running Devuan one day? *wink,nudge*
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd

2019-05-24 Thread Rick Moen
[correcting unexplained departure into offlist personal mail, by
forwarding back onlist.]

Quoting John Hughes (j...@atlantech.com):

> So, what we learn from this exercise is that on Unix derived systems root can 
> crash the system, an unexpected result, no?

If my system crashed four of the five times I accidentally asked kill(8)
to generate a non-existent signal type, personally, I'd consider that
highly undesirable behaviour.  It's tantamount to 'I'm sorry, you have
no right to be dissatisifed that your system suddenly fell over just
because you sneezed:  You were UID 0 at the time.'  That chain of
reasoning actually doesn't work for me.

Your understanding of acceptable root-user system semantics may Differ A
Lot.[tm]  OK with me, if so.  Dad used to say, 'Life is anthopology.'

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd

2019-05-24 Thread Rick Moen
Quoting Martin Steigerwald (mar...@lichtvoll.de):

[...]
> While sending SIGKILL to Systemd did not have any effect, sending SIGILL 
> – illegal instruction – to it brought the machine to an halt. I 
> reproduced it with
> 
> while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
[...]

OMG, that's both sad and hilarious.

The jokes about systemd being ILL almost tell themselves.

-- 
Rick Moen "The race is not to the swift, nor the battle
r...@linuxmafia.com   to the strong..., but that's the way to bet."  
McQ!  (4x80)  -- Damon Runyon, riffing off Ecclesiastes 9:11
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Linux system can be brought down by sending SIGILL to Systemd

2019-05-24 Thread Martin Steigerwald
Hi!

Today in a Linux training a participant attempted to bring down Debian 
workstation with Systemd by sending signals to PID 1 as I invited them 
to try to bring down PID 1 while thinking for myself that this would not 
be possible from my past experiences about trying to bring down PID 1 – 
init – myself.

While sending SIGKILL to Systemd did not have any effect, sending SIGILL 
– illegal instruction – to it brought the machine to an halt. I 
reproduced it with

while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done

on my training workstation (Debian 9.9 with Systemd 232 and 4.9.0-9 
Debian Kernel with MDS mitigation).

The mouse pointer froze and the machine did not even respond to ping 
anymore! According to participants about 4 to 5 times sending the signal 
would be enough to bring down a workstation with Systemd as PID 1.

Despite all the bugs and issues I have seen or read about with Systemd I 
was very surprised about that result.

Curiously I attempted the same with the Debian on my laptop that I 
switched to SysVInit and elogind. As the elogind stuff mostly works I 
think I will switch it to Devuan once I come around to it.

I am able to run

while true; do kill -ILL 1 ; echo -n "." ; done

against SysVinit's "init" process without any issue for minutes (Debian 
Sid with sysvinit 2.93-8 and self-compiled 5.1.2 kernel, also with MDS 
mitigation). It is even running while I write this mail normally now.

Also the participants found in the manpage kill(2):

NOTES
   The  only  signals  that  can be sent to process ID 1, the init
   process, are those for which init has explicitly installed sig‐
   nal handlers.  This is done to assure the system is not brought
   down accidentally.

So if that is actually true, then it appears that Systemd initiates a 
signal handler for SIGILL for whatever reason.

I pondered about writing a bug report to Systemd developers, but 
honestly from my past experiences with upstream feedback about bug 
reports regarding Systemd I then decided not to bother about it. I am 
not willing to take in and deal with any more "this is by design, go 
away" or "this works as intended, go away" kind of responses. I am not 
interested in Systemd to a larger extent than teaching participants of 
my training what they need to know about it, when they have to deal with 
it due to distribution choices made at their employer. And yes, I also 
have a slide that summarizes critique about it, complete with links, so 
they can make up their own opinion. And no, for me it is not black and 
white, but my own decision is to go without Systemd.

This is another reason for me to start to provide Devuan VMs in the 
Proxmox VE environment I use to provide VMs of various distributions to 
the participants of my trainings. So participants can have a look at it 
and do exercises with it if they like. I already started to incorporate 
information about Devuan in some of my slides.

I share it here not to invite another bashing about Systemd, we really 
do not need to go there, but instead can focus on strengthening the 
alternatives. But I share it here to provide another reason to use a 
Systemd-free distribution like Devuan. I also share it as an example of 
the robustness of the SysVInit init process!

Thanks,
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng