grub-probe coredumps with SIGSEGV

Bug #970937 reported by srini
6
This bug affects 1 person
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/non-existent file is given.

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.02-0ubuntu2) 7.4-2012.02
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/sbin/grub-probe...(no debugging symbols found)...done.
(gdb) r --target=device /tmp/helloworld
Starting program: /usr/sbin/grub-probe --target=device /tmp/helloworld
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

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

Tags: grub-probe
Revision history for this message
Colin Watson (cjwatson) wrote :

Seems to be fixed upstream:

revno: 3824
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_file_name
        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.

Changed in grub2 (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

OK, with the aid of bug 938724 I now see why this is a problem. I'll mark this one as a duplicate since the other was considerably earlier; but expect a fix soon.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.