grub-probe coredumps with SIGSEGV
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
I was trying to update grub into the image that I created when I saw update-grub crash. After probing a little further it appeared that grub-probe was crashing. grub-probe crashes when a query is made for a device type when an unknown/
It is not a problem if a valid filename is given.
This happens in ubuntu precise 12.04 beta2 distribution.
bash-4.2# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu precise (development branch)
Release: 12.04
Codename: precise
gdb grub-probe
GNU gdb (Ubuntu/Linaro 7.4-2012.
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/sbin/
(gdb) r --target=device /tmp/helloworld
Starting program: /usr/sbin/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Program received signal SIGSEGV, Segmentation fault.
0x0000000000432912 in ?? ()
(gdb) x/i $rip
=> 0x432912: cmpb $0x0,(%r15)
(gdb) p $r15
$1 = 0
(gdb) quit
bash-4.2# grub-probe --target=device /
/dev/loop4
Seems to be fixed upstream:
revno: 3824 file_name
author: Richard Laager <email address hidden>
committer: Vladimir 'phcoder' Serbinenko <email address hidden>
branch nick: grub
timestamp: Fri 2012-02-03 11:02:06 +0100
message:
* util/grub-probe.c (probe): Don't crash on canonicalize_
failure.
Put back lost PRINT_DRIVE.
It's just converting a segfault into a different kind of failure, though, so I think I'll leave this until I pull in 2.00~beta* or newer in 12.10.