Project

General

Profile

Bug #8226

missing boot environments cause bootadm list-menu to segfault

Added by Andrew Stormont over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
2017-05-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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.

History

#1

Updated by Andrew Stormont over 2 years ago

  • Subject changed from missing boot environments cause bootadm-list to segfault to missing boot environments cause bootadm list-menu to segfault
#3

Updated by Andrew Stormont over 2 years ago

  • Description updated (diff)
#4

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 760a3dc429d80e72277b67bec8135d2d185efe9a

commit  760a3dc429d80e72277b67bec8135d2d185efe9a
Author: Toomas Soome <tsoome@me.com>
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 <yuripv@gmx.com>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: John Howard <Echosoft.LLC@gmail.com>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF