15

In this question, the accepted answers states that

For example, /sbin/init uses glibc [the vulnerable lib], and restarting that without a reboot is non-trivial.

Now, non-trivial is engineer'ish for impossible, but I'm still curious:

Is it possible to restart init without restarting the whole system?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Sebb
  • 626
  • 1
  • 5
  • 11

2 Answers2

18
telinit u

will restart init without affecting the rest of the system.

Stephen Kitt
  • 434,908
  • Not a that crazy work arround as I expected/hoped for, but correct. Thank you :) – Sebb Jan 29 '15 at 11:58
  • 5
    I can't imagine that the sysv init does any calls to gethostbyname() etc., and certainly not with data that comes from outside of the system so I don't consider restarting init a priority in the context of the ghost bug. – wurtel Jan 29 '15 at 13:46
  • 5
    This works for sysvinit and systemd (equivalent to systemd daemon-reexec). – Braiam Jan 29 '15 at 15:30
  • 2
    This doesn't work with all init implementations on all Unix variants (IIRC on AIX you're out of work), but as far as I know it does work with all init implementations that might be linked with glibc. – Gilles 'SO- stop being evil' Jan 29 '15 at 21:51
3

A simple init u does the trick!

Afterwards, zypper ps doesn't report deleted files of the init process any more.

don_crissti
  • 82,805
Thomas
  • 31