Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #209099 > unrolled thread

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

Started byFred <fred@blakemfg.com>
First post2019-05-24 23:30 +0200
Last post2019-05-25 12:20 +0200
Articles 13 — 8 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Fwd: [DNG] Linux system can be brought down by sending SIGILL to  Systemd Fred <fred@blakemfg.com> - 2019-05-24 23:30 +0200
    Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd arne <sp113438@telfort.nl> - 2019-05-25 00:10 +0200
      Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd arne <sp113438@telfort.nl> - 2019-05-25 00:40 +0200
        Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd Reco <recoverym4n@enotuniq.net> - 2019-05-25 09:50 +0200
          Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd mick crane <mick.crane@gmail.com> - 2019-05-25 11:00 +0200
          Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd <tomas@tuxteam.de> - 2019-05-25 14:10 +0200
        Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd - PID 1 is killed it seems arne <sp113438@telfort.nl> - 2019-05-25 11:50 +0200
          Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd - PID 1 is killed it seems Kenneth Parker <sea7kenp@gmail.com> - 2019-05-25 15:00 +0200
            Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd - PID 1 is killed it seems <tomas@tuxteam.de> - 2019-05-25 15:30 +0200
            Re: [DNG] Linux system can be brought down by sending SIGILL to  Systemd - PID 1 is killed it seems arne <sp113438@telfort.nl> - 2019-05-25 15:30 +0200
    [Possibly fake news] [DNG] Linux system can be brought down by  sending SIGILL to Systemd <tomas@tuxteam.de> - 2019-05-25 08:40 +0200
      Re: [Possibly fake news] [DNG] Linux system can be brought down by  sending SIGILL to Systemd Curt <curty@free.fr> - 2019-05-25 10:20 +0200
      Re: [Possibly fake news] [DNG] Linux system can be brought down by  sending SIGILL to Systemd Nicolas George <george@nsup.org> - 2019-05-25 12:20 +0200

#209099 — Fwd: [DNG] Linux system can be brought down by sending SIGILL to Systemd

FromFred <fred@blakemfg.com>
Date2019-05-24 23:30 +0200
SubjectFwd: [DNG] Linux system can be brought down by sending SIGILL to Systemd
Message-ID<y1pVf-2LG-3@gated-at.bofh.it>
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@lichtvoll.de>
To: 	DNG <dng@lists.dyne.org>



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

[toc] | [next] | [standalone]


#209102

Fromarne <sp113438@telfort.nl>
Date2019-05-25 00:10 +0200
Message-ID<y1qxX-3eQ-3@gated-at.bofh.it>
In reply to#209099
On Fri, 24 May 2019 14:01:35 -0700
Fred <fred@blakemfg.com> 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@lichtvoll.de>
> To: 	DNG <dng@lists.dyne.org>
> 
> 
> 
> 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

[toc] | [prev] | [next] | [standalone]


#209104

Fromarne <sp113438@telfort.nl>
Date2019-05-25 00:40 +0200
Message-ID<y1r0Z-3pF-1@gated-at.bofh.it>
In reply to#209102
On Fri, 24 May 2019 23:43:49 +0200
arne <sp113438@telfort.nl> wrote:

> On Fri, 24 May 2019 14:01:35 -0700
> Fred <fred@blakemfg.com> 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@lichtvoll.de>
> > To: 	DNG <dng@lists.dyne.org>
> > 
> > 
> > 
> > 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.

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

[toc] | [prev] | [next] | [standalone]


#209113

FromReco <recoverym4n@enotuniq.net>
Date2019-05-25 09:50 +0200
Message-ID<y1zBf-ik-1@gated-at.bofh.it>
In reply to#209104
	Hi.

On Sat, May 25, 2019 at 12:21:07AM +0200, arne wrote:
> On Fri, 24 May 2019 23:43:49 +0200
> arne <sp113438@telfort.nl> wrote:
> 
> > On Fri, 24 May 2019 14:01:35 -0700
> > Fred <fred@blakemfg.com> 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@lichtvoll.de>
> > > To: 	DNG <dng@lists.dyne.org>
> > > 
> > > 
> > > 
> > > 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

[toc] | [prev] | [next] | [standalone]


#209115

Frommick crane <mick.crane@gmail.com>
Date2019-05-25 11:00 +0200
Message-ID<y1AH0-V9-9@gated-at.bofh.it>
In reply to#209113
On 2019-05-25 08:25, Reco wrote:

>> 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.

If you are going to kill off processes as root I'd expect things to be 
unhappy.
I once accidentally removed everything from / down and that stopped it 
working as well.

mick

-- 
Key ID    4BFEBB31

[toc] | [prev] | [next] | [standalone]


#209127

From<tomas@tuxteam.de>
Date2019-05-25 14:10 +0200
Message-ID<y1DER-2VO-1@gated-at.bofh.it>
In reply to#209113

[Multipart message — attachments visible in raw view] — view raw

On Sat, May 25, 2019 at 10:25:26AM +0300, Reco wrote:

[...]

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

This is *exactly* the point. If you are root, there are far more creative
(and fun) ways to bring down your system, regardless of how your init
process is called.

I'll pay a virtual beer [1] to the first one here which comes with a shell
one-liner overwriting the first gig of init's heap space with /dev/urandom
(say the modern and correct moral equivalent of

  dd if=/dev/urandom of=/proc/1/mem bs=4096 count=256k 

... shouldn't be hard).

Cheers

[1] exchangeable by some physical $beverage of choice should we meet
   in person.

-- t

[toc] | [prev] | [next] | [standalone]


#209117 — Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems

Fromarne <sp113438@telfort.nl>
Date2019-05-25 11:50 +0200
SubjectRe: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems
Message-ID<y1Bto-1qR-7@gated-at.bofh.it>
In reply to#209104
On Sat, 25 May 2019 00:21:07 +0200
arne <sp113438@telfort.nl> wrote:

> On Fri, 24 May 2019 23:43:49 +0200
> arne <sp113438@telfort.nl> wrote:
> 
> > On Fri, 24 May 2019 14:01:35 -0700
> > Fred <fred@blakemfg.com> 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@lichtvoll.de>
> > > To: 	DNG <dng@lists.dyne.org>
> > > 
> > > 
> > > 
> > > 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.
> 
> I had no fear to run the script as I use systemd, so I know how to
> use the SysReq keys very well ;)
> 
> 
> 

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

I found out PID 1 is killed when I tried to reboot:
# reboot
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.

So I will have to use SysReq keys

[toc] | [prev] | [next] | [standalone]


#209128 — Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems

FromKenneth Parker <sea7kenp@gmail.com>
Date2019-05-25 15:00 +0200
SubjectRe: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems
Message-ID<y1Erg-3bz-1@gated-at.bofh.it>
In reply to#209117

[Multipart message — attachments visible in raw view] — view raw

On Sat, May 25, 2019, 5:45 AM arne <sp113438@telfort.nl> wrote:

> On Sat, 25 May 2019 00:21:07 +0200
> arne <sp113438@telfort.nl> wrote:
>
> > On Fri, 24 May 2019 23:43:49 +0200
> > arne <sp113438@telfort.nl> wrote:
> >
> > > On Fri, 24 May 2019 14:01:35 -0700
> > > Fred <fred@blakemfg.com> 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@lichtvoll.de>
> > > > To:       DNG <dng@lists.dyne.org>
> > > >
> > > >
> > > >
> > > > 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.
> >
> > I had no fear to run the script as I use systemd, so I know how to
> > use the SysReq keys very well ;)
> >
> >
> >
>
> # while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
>
> I found out PID 1 is killed when I tried to reboot:
> # reboot
> Failed to open /dev/initctl: No such device or address
> Failed to talk to init daemon.
>
> So I will have to use SysReq keys
>

Can somebody, please link me to the Documentation Files on those SysReq
keys?  Thanks!

Kenneth Parker

>
>

[toc] | [prev] | [next] | [standalone]


#209129 — Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems

From<tomas@tuxteam.de>
Date2019-05-25 15:30 +0200
SubjectRe: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems
Message-ID<y1EUh-3B7-3@gated-at.bofh.it>
In reply to#209128

[Multipart message — attachments visible in raw view] — view raw

On Sat, May 25, 2019 at 08:35:45AM -0400, Kenneth Parker wrote:

[...]

> Can somebody, please link me to the Documentation Files on those SysReq
> keys?  Thanks!

https://en.wikipedia.org/wiki/Magic_SysRq_key

Cheers
-- t

[toc] | [prev] | [next] | [standalone]


#209130 — Re: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems

Fromarne <sp113438@telfort.nl>
Date2019-05-25 15:30 +0200
SubjectRe: [DNG] Linux system can be brought down by sending SIGILL to Systemd - PID 1 is killed it seems
Message-ID<y1EUh-3B7-1@gated-at.bofh.it>
In reply to#209128
> > # while true; do kill -ILL 1 ; echo -n "." ;  sleep 0.5 ; done
> >
> > I found out PID 1 is killed when I tried to reboot:
> > # reboot
> > Failed to open /dev/initctl: No such device or address
> > Failed to talk to init daemon.
> >
> > So I will have to use SysReq keys
> >  
> 
> Can somebody, please link me to the Documentation Files on those
> SysReq keys?  Thanks!
> 
> Kenneth Parker
> 
> >
> >  
https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html

[toc] | [prev] | [next] | [standalone]


#209110 — [Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd

From<tomas@tuxteam.de>
Date2019-05-25 08:40 +0200
Subject[Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd
Message-ID<y1yvv-87G-1@gated-at.bofh.it>
In reply to#209099

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 24, 2019 at 02:01:35PM -0700, Fred wrote:
> Hello,
> I subscribe to the Devuan Linux mailing list.  This posting just
> arrived and it appears quite important to Debian.

[about sending SIGILL to systemd]

This is most probably fake news.

You have to have appropriate permissions to send *any* signal to a
proces. From the kill(2) man page

  "For a process to have permission to send a signal, it
  must either be privileged (under Linux: have the  CAP_KILL
  capability  in the  user namespace  of  the  target process),
  or the real or effective user ID of the sending process must
  equal the real or saved set-user-ID of the target process.
  In the case of SIGCONT, it suffices when the sending and
  receiving processes belong to the same session.  (Historically,
  the rules were different; see NOTES.)"

That means that to send SIGILL to pid 1 you most probably gotta be
root (systemd or not). And then, there are more classy ways to bring
your system down anyway.

Folks, please double-check that stuff before reposting. I don't want
the Debian mailing list to become Fakebook or Twitter.

Cheers
-- tomás

[toc] | [prev] | [next] | [standalone]


#209114 — Re: [Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd

FromCurt <curty@free.fr>
Date2019-05-25 10:20 +0200
SubjectRe: [Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd
Message-ID<y1A4h-Hw-3@gated-at.bofh.it>
In reply to#209110
On 2019-05-25, <tomas@tuxteam.de> <tomas@tuxteam.de> wrote:
>
> Folks, please double-check that stuff before reposting. I don't want
> the Debian mailing list to become Fakebook or Twitter.
>

Or Der Spiegel.

https://www.theatlantic.com/international/archive/2019/01/der-spiegal-fabrication-scandal-global/579889/

-- 
“Decisions are never really made – at best they manage to emerge, from a chaos
of peeves, whims, hallucinations and all around assholery.” – Thomas Pynchon

[toc] | [prev] | [next] | [standalone]


#209120 — Re: [Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd

FromNicolas George <george@nsup.org>
Date2019-05-25 12:20 +0200
SubjectRe: [Possibly fake news] [DNG] Linux system can be brought down by sending SIGILL to Systemd
Message-ID<y1BWq-1PV-3@gated-at.bofh.it>
In reply to#209110

[Multipart message — attachments visible in raw view] — view raw

tomas@tuxteam.de (12019-05-25):
> That means that to send SIGILL to pid 1 you most probably gotta be
> root (systemd or not). And then, there are more classy ways to bring
> your system down anyway.
> 
> Folks, please double-check that stuff before reposting. I don't want
> the Debian mailing list to become Fakebook or Twitter.

No need to double check: with a little common sense and technical
competence, a single check is enough.

Remember folks:

The proof that systemd is evil is that "cat /lib/systemd/systemd >
/dev/sda" will likely make your system unbootable.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web