[apport] hald-probe-volume crashed with SIGSEGV in strlen()

Bug #87800 reported by chriwi
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
HAL
Fix Released
Medium
hal (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

I found this report after booting, I don't know when it appeared

ProblemType: Crash
CrashCounter: 1
Date: Sun Feb 25 17:02:12 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/lib/hal/hald-probe-volume
Package: hal 0.5.8.1-4ubuntu8
ProcCmdline: /usr/lib/hal/hald-probe-volume
ProcCwd: /usr/lib/hal
ProcEnviron: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin
Signal: 11
SourcePackage: hal
StacktraceTop:
 strlen () from /lib/tls/i686/cmov/libc.so.6
 strdup () from /lib/tls/i686/cmov/libc.so.6
 libhal_changeset_set_property_string ()
 ?? ()
 ?? ()
Uname: Linux ubuntu1 2.6.20-8-generic #2 SMP Tue Feb 13 05:18:42 UTC 2007 i686 GNU/Linux
UserGroups:

Related branches

Revision history for this message
chriwi (christian-wirtz) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Debug backtrace for the crash:

Loaded symbols for /lib/ld-linux.so.2
Core was generated by `/usr/lib/hal/hald-probe-volume'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7da7c03 in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) thread apply all bt full

Thread 1 (process 5198):
#0 0xb7da7c03 in strlen () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#1 0xb7da7935 in strdup () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb7fa3642 in libhal_changeset_set_property_string (changeset=0x8051088, key=0x804ef56 "volume.fstype", value=0x0)
    at libhal.c:3620
        elem = <value optimized out>
#3 0x0804965a in set_volume_id_values (ctx=<value optimized out>, udi=<value optimized out>, cs=0x8051088, vid=0x8053098)
    at probe-volume.c:125
        buf = "B^��H7��\200!ҷ\001\000\000\000�fԷ88��-��������/��\2205��@�������B^��H7��\200!ҷ�o�� \201���1\005\b����\020Nڷ \201���1\005\b�fԷ\204\026��\2300\005\b�1\005\b\b���в��\002\000\000\000\204\026��\2300\005\b\000\000\000\000\b���(����1\005\b\000\000\000\0008�������\204\026��\000\216n\0038�������\2300\005\b\000\000\000\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\000����\204\026��"...
        usage = 0x804eef3 "other"
        volume_label = <value optimized out>
        error = {name = 0x0, message = 0x0, dummy1 = 1, dummy2 = 0, dummy3 = 0, dummy4 = 1, dummy5 = 0,
  padding1 = 0x20e40}
        __FUNCTION__ = "set_volume_id_values"
#4 0x08049d50 in main () at probe-volume.c:637
        fd = 4
        ret = <value optimized out>
        udi = 0xbffbeef3 "/org/freedesktop/Hal/devices/temp/145"
        device_file = 0xbffbee05 "/dev/hdd3"
        ctx = (LibHalContext *) 0x8051030
        error = {name = 0x0, message = 0x0, dummy1 = 1, dummy2 = 0, dummy3 = 0, dummy4 = 1, dummy5 = 0,
  padding1 = 0xb7fcb2d0}
        parent_udi = 0xbffbee42 "/org/freedesktop/Hal/devices/storage_serial_VNVD06G4H6J4RL"
        sysfs_path = <value optimized out>
        vid = (struct volume_id *) 0x8053098
        stordev_dev_file = 0x8051cf8 "/dev/hdd"
        partition_number_str = 0xbffbeb99 "3"
        partition_start_str = <value optimized out>
        is_disc_str = <value optimized out>
        is_disc = 0
        partition_number = 3
        partition_start = 123461452800
        block_size = 512
        vol_size = 57576960
        should_probe_for_fs = 3220958236
        vol_probe_offset = 0
        cs = (LibHalChangeSet *) 0x8051088
        __FUNCTION__ = "main"
#5 0xb7d4febc in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#6 0x08049501 in _start ()
No symbol table info available.

Martin Pitt (pitti)
Changed in hal:
assignee: nobody → pitti
importance: Undecided → Medium
status: Unconfirmed → In Progress
Revision history for this message
In , Martin Pitt (pitti) wrote :

In the Ubuntu bug report above we got a crash in hald-probe-volume when trying to assign NULL to volume.fstype. The debug stack trace at

  https://launchpad.net/ubuntu/+source/hal/+bug/87800/comments/2

pinpoints the issue pretty well. However, I'm not entirely sure at which level this should be fixed. Just set it to an empty string?

Revision history for this message
In , Martin Pitt (pitti) wrote :

Hm, just setting it to the empty string might make it crash on the next NULL field, so this is not just an one-line patch.

Changed in hal:
status: Unknown → Confirmed
Revision history for this message
In , Danny Kukawka (danny-kukawka) wrote :

Created an attachment (id=9359)
possible fix

Does this patch help? Let me know to get this into 0.5.9

Changed in hal:
status: Confirmed → Needs Info
Revision history for this message
Daniel Holbach (dholbach) wrote :
Changed in hal:
status: In Progress → Needs Info
Revision history for this message
In , Martin Pitt (pitti) wrote :

Uploaded into Ubuntu, I asked the reporter for feedback.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 87800] Re: [apport] hald-probe-volume crashed with SIGSEGV in strlen()

Hi,

Daniel Holbach [2007-03-30 7:45 -0000]:
> The patch
> https://bugs.freedesktop.org/attachment.cgi?id=9359&action=view needs
> testing.

I'll put it into Feisty ASAP.

Martin Pitt (pitti)
Changed in hal:
status: Needs Info → In Progress
Martin Pitt (pitti)
Changed in hal:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

This should be fixed in this Feisty version:

 hal (0.5.8.1-4ubuntu12) feisty; urgency=low
 .
   * Add debian/patches/66-NULL-fstype-crash.patch: Do not crash on NULL
     volume.fstypes, and assing some fallback values to them. Patch from Danny
     Kukawa in FD#10429. (LP: #87800)
   * debian/patches/24_ignored_volumes.patch: Ignore partitions which are
     mounted by default in /etc/fstab only when they are not currently mounted
     (this could happen on damaged partitions, failed fsck, etc., and
     inexperienced users should not randomly mount those.). Since this would
     make system partitions visible, limit the visible ones to /media/ again,
     as in previous Ubuntu releases. (LP: #73227)
   * Add debian/10-storage-policy.fdi: Resurrect 'Eject all USB and Firewire
     storage devices', just as in previous Ubuntu releases. (LP: #97366)
   * Add debian/patches/67-fix-probe-volume.patch: Attempt to fix scrambled
     labels. Taken from FD#10362, thanks to Danny Kukawa. (LP: #69914)

Can you please check out a live CD (from tomorrow on) whether you still get this crash? Apparently you inserted an USB Stick, a CD-ROM, or a new hard disk partition with an empty or broken label, and that caused this hal crash.

Changed in hal:
status: Fix Committed → Fix Released
Revision history for this message
Danny Kukawka (danny-kukawka) wrote :

Any news here? Work the patch?

Revision history for this message
In , Danny Kukawka (danny-kukawka) wrote :

commited to git HEAD and 0.5.9 branch

Changed in hal:
status: Needs Info → Fix Released
Changed in hal:
importance: Unknown → Medium
Changed in hal:
importance: Medium → Unknown
Changed in hal:
importance: Unknown → Medium
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.