Bug#483900: grub-probe -t segfaults

Joey Hess joeyh at debian.org
Sat May 31 23:13:43 UTC 2008


Package: grub-pc
Version: 1.96+20080531-1
Severity: normal

Updating /boot/grub/grub.cfg ...
/usr/lib/grub/update-grub_lib: line 75: 29785 Segmentation fault      ${grub_probe} -t fs $path > /dev/null 2>&1
Found Debian background: debian-blueish-wallpaper-640x480.png
Found linux image: /boot/vmlinuz-2.6.25-2-686
Found initrd image: /boot/initrd.img-2.6.25-2-686
Found linux image: /boot/vmlinuz-2.6.24-1-686
Found initrd image: /boot/initrd.img-2.6.24-1-686
Found linux image: /boot/vmlinuz-2.6.18-4-686
Found initrd image: /boot/initrd.img-2.6.18-4-686
done
/var/lib/dpkg/info/grub-pc.postinst: line 55: 29975 Segmentation fault      grub-probe -t fs $i > /dev/null 2>&1
/var/lib/dpkg/info/grub-pc.postinst: line 55: 29977 Segmentation fault      grub-probe -t fs $i > /dev/null 2>&1

Installation succeeded despite these segfaults, which I can reproduce:

root at kodama:/home/joey>grub-probe -t fs /usr/share/grub/unicode.pff 
zsh: segmentation fault  grub-probe -t fs /usr/share/grub/unicode.pff

In dmesg:

grub-probe[29735]: segfault at 00000000 eip b7ee2ca8 esp bfa62fec error 4
grub-probe[29736]: segfault at 00000000 eip b7e09ca8 esp bff6ccfc error 4
grub-probe[29737]: segfault at 00000000 eip b7e4fca8 esp bf897e2c error 4

ltrace shows the following NULL pointer dereference:

strlen("/dev/mapper/kodama-root")               = 23
malloc(12)                                      = 0x806f028
strcpy(0x806f028, "kodama-root")                = 0x806f028
malloc(8)                                       = 0x806f038
malloc(36)                                      = 0x806f0d0
malloc(12)                                      = 0x806f0f8
strcmp("hd0", "kodama-root")                    = -1
strcmp(NULL, "kodama-root" <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/kodama-root / ext3 rw,noatime,errors=remount-ro,data=ordered 0 0
/dev/mapper/kodama-root /dev/.static/dev ext3 rw,errors=remount-ro,data=ordered 0 0
/dev/hda1 /boot ext3 rw,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/hda
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
set root=(hd0,1)
search --fs-uuid --set 567c1253-fceb-42b9-bf16-e4935d4c5c4d
if font /grub/unicode.pff ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  terminal gfxterm
fi
set root=(hd0,1)
search --fs-uuid --set 567c1253-fceb-42b9-bf16-e4935d4c5c4d
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set root=(hd0,1)
search --fs-uuid --set 567c1253-fceb-42b9-bf16-e4935d4c5c4d
insmod png
if background_image /grub/debian-blueish-wallpaper-640x480.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
set root=(hd0,1)
search --fs-uuid --set 567c1253-fceb-42b9-bf16-e4935d4c5c4d
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, linux 2.6.25-2-686" {
	linux	/vmlinuz-2.6.25-2-686 root=/dev/mapper/kodama-root ro acpi_sleep=s3_bios 
	initrd	/initrd.img-2.6.25-2-686
}
menuentry "Debian GNU/Linux, linux 2.6.25-2-686 (single-user mode)" {
	linux	/vmlinuz-2.6.25-2-686 root=/dev/mapper/kodama-root ro single acpi_sleep=s3_bios
	initrd	/initrd.img-2.6.25-2-686
}
menuentry "Debian GNU/Linux, linux 2.6.24-1-686" {
	linux	/vmlinuz-2.6.24-1-686 root=/dev/mapper/kodama-root ro acpi_sleep=s3_bios 
	initrd	/initrd.img-2.6.24-1-686
}
menuentry "Debian GNU/Linux, linux 2.6.24-1-686 (single-user mode)" {
	linux	/vmlinuz-2.6.24-1-686 root=/dev/mapper/kodama-root ro single acpi_sleep=s3_bios
	initrd	/initrd.img-2.6.24-1-686
}
menuentry "Debian GNU/Linux, linux 2.6.18-4-686" {
	linux	/vmlinuz-2.6.18-4-686 root=/dev/mapper/kodama-root ro acpi_sleep=s3_bios 
	initrd	/initrd.img-2.6.18-4-686
}
menuentry "Debian GNU/Linux, linux 2.6.18-4-686 (single-user mode)" {
	linux	/vmlinuz-2.6.18-4-686 root=/dev/mapper/kodama-root ro single acpi_sleep=s3_bios
	initrd	/initrd.img-2.6.18-4-686
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]    1.5.22          Debian configuration management sy
ii  grub-common              1.96+20080531-1 GRand Unified Bootloader, version 
ii  libc6                    2.7-11          GNU C Library: Shared libraries
ii  liblzo2-2                2.03-1          data compression library
ii  libncurses5              5.6+20080503-1  Shared libraries for terminal hand

grub-pc recommends no packages.

-- debconf information:
  grub-pc/linux_cmdline:
* grub-pc/chainload_from_menu.lst: true

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080531/f3f38d20/attachment.pgp 


More information about the Pkg-grub-devel mailing list