grub-probe crashes with null pointer dereference in probe_raid_level
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub2
This occurs on a machine which previously worked just fine. grub-pc is installed in the MBR of /dev/sda, which consists of a single partition with an LVM pv on there. /boot is on /, which is on the Ubuntu-Root lv. This worked fine.
I installed a second SATA disc, created a single partition, and added it to the Primary-Storage vg. Now, grub-probe segfaults when called with --target=
Tracing things back with gdb, this occurs because probe_raid_level on grub-probe.c:167 is called with list->disk, which is NULL. list->disk is NULL because grub_lvm_
Upon adding an entry for /dev/sdb to /boot/grub/
ProblemType: Bug
Architecture: amd64
Date: Sat Nov 14 19:11:24 2009
DistroRelease: Ubuntu 9.10
Package: grub-common 1.97~beta4-1ubuntu4
ProcEnviron:
SHELL=/bin/zsh
PATH=(custom, user)
LANG=en_AU.UTF-8
ProcVersionSign
SourcePackage: grub2
Uname: Linux 2.6.31-15-generic x86_64
This is fixed now in Lucid. Here's the ChangeLog entry:
2010-01-20 Dan Merillat <email address hidden>
* kern/device.c (grub_device_ iterate) : Allocate new part_ent
structure based on sizeof (*p) rather than sizeof (p->next), to
account for structure padding.
* util/grub-probe.c (probe_raid_level): Return -1 immediately if
disk is NULL, which might happen for LVM physical volumes with no
LVM signature.