Public bug reported:
/usr/share/initramfs-tools/scripts/init-bottom/dropbear uses 'ps -o' to
find dropbear descendants to kill, but the busybox ps inside initramfs
doesn't support -o so nothing is killed other than the main dropbear.
My session drops briefly when init-bottom/dropbear brings down the
network interfaces then comes back when the same IP is assigned. At that
point I'm left in a busybox shell with access to nothing. For some
reason I can run find and ls but not other busybox built-in commands
like ps, sleep, etc. `pwd` puts me at /root-yMx7eP, and `find /` returns
only "/" and "/root". Exiting from this shell prints "Aiee, segfault!
You should probably report this as a bug to the developer" on the main
console.
Of note is that /bin/busybox (shipped with busybox-static) supports 'ps -o' but
/usr/lib/initramfs-tools/bin/busybox is used in initramfs and does not:
===========================================
$ /bin/busybox ps --help
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER] [-T]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
-T Show threads
$ /usr/lib/initramfs-tools/bin/busybox ps --help
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
===========================================
My system is amd64 18.04.1.
busybox-initramfs 1:1.27.2-2ubuntu3
busybox-static 1:1.27.2-2ubuntu3
dropbear-bin 2017.75-3build1
dropbear-initramfs 2017.75-3build1
initramfs-tools 0.130ubuntu3.5
Here's relevant console output during boot:
===========================================
Begin: Running /scripts/init-bottom ... Begin: Stopping dropbear ... ps:
invalid option -- 'o'
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
ps: invalid option -- 'o'
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
done.
Begin: Bringing down ens3 ... done.
Begin: Bringing down lo ... done.
done.
===========================================
** Affects: dropbear (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1804508
Title:
dropbear-initramfs init-bottom script uses wrong ps options, can't
kill descendants
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/1804508/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs