missing boot environments cause bootadm list-menu to segfault
Somewhere in the process of upgrading my system the GRUB menu.lst was not updated. This left me with a menu file that references datasets which are no longer present and causes bootadm list-menu to segfault.
If you look at the code in the print_menu_nodes function you will see that it walks the list of boot environments looking for a match. if it is unable to find one the be_node variable is left set to NULL. This then leads to a NULL pointer dereference when the be_active_on_boot member is accessed.
Updated by Electric Monk over 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 760a3dc429d80e72277b67bec8135d2d185efe9a Author: Toomas Soome <firstname.lastname@example.org> Date: 2017-06-10T16:16:47.000Z 8129 bootadm: add support for non-zfs boot entries in menu.lst 8226 missing boot environments cause bootadm list-menu to segfault Reviewed by: Yuri Pankov <email@example.com> Reviewed by: Hans Rosenfeld <firstname.lastname@example.org> Reviewed by: John Howard <Echosoft.LLC@gmail.com> Reviewed by: Andrew Stormont <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>