Web lists-archives.com

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




	Hi.

On Sat, May 25, 2019 at 12:21:07AM +0200, arne wrote:
> On Fri, 24 May 2019 23:43:49 +0200
> arne <sp113438@xxxxxxxxxx> wrote:
> 
> > On Fri, 24 May 2019 14:01:35 -0700
> > Fred <fred@xxxxxxxxxxxx> wrote:
> > 
> > > Hello,
> > > I subscribe to the Devuan Linux mailing list.  This posting just
> > > arrived and it appears quite important to Debian.
> > > 
> > > -------- Forwarded Message --------
> > > Subject: 	[DNG] Linux system can be brought down by sending
> > > SIGILL to Systemd
> > > Date: 	Fri, 24 May 2019 22:04:34 +0200
> > > From: 	Martin Steigerwald <martin@xxxxxxxxxxxx>
> > > To: 	DNG <dng@xxxxxxxxxxxxxx>
> > > 
> > > 
> > > 
> > > 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 true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
> > ...........................^C
> > 
> > no problem here
> > kernel 5.1.4 stretch amd64 with systemd
> > 
> 
> Perhaps that test was a little too short so I let it run a little
> longer:
> 
> # while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
> ..................................................................................................................................................................................................................................................................................................................................................................................................................................................^C
> 
> again no problem here.

Stretch's systemd:

# kill -ILL 1
Message from syslogd@xxx at May 25 10:19:09 ...
 systemd[1]: Caught <ILL>, dumped core as pid 822.
...
systemd[1]: Freezing execution.


The userspace and the kernel will work after this, but anything that's
related to systemd (including poweroff and shutdown) just hangs.

Seems harmless to me as one needs to be root to send signals to PID 1.

> I had no fear to run the script as I use systemd, so I know how to
> use the SysReq keys very well ;)

There's also that /proc/sysrq-trigger in the case the console isn't
accessible.

Reco