[Parted-maintainers] Bug#519532: Still segfaults in very simple cases

Rogério Brito rbrito at ime.usp.br
Thu Nov 5 00:52:24 UTC 2009


Package: gnu-fdisk
Version: 1.2.3-2
Severity: normal

I just included some asserts in the code to see where this serious
segmentation fault was coming from and, sure, here it is:

,----
| chagas:/tmp/gnu-fdisk-1.2.3/src# gdb ./fdisk
| GNU gdb (GDB) 7.0-debian
| Copyright (C) 2009 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://www.gnu.org/software/gdb/bugs/>...
| Reading symbols from /tmp/gnu-fdisk-1.2.3/src/fdisk...done.
| (gdb) set args -l /dev/hda
| (gdb) run
| Starting program: /tmp/gnu-fdisk-1.2.3/src/fdisk -l /dev/hda
| GNU Fdisk 1.2.3
| Copyright (C) 1998 - 2006 Free Software Foundation, Inc.
| This program is free software, covered by the GNU General Public License.
| 
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
| GNU General Public License for more details.
| 
| fdisk: fdisk.c:1332: fdisk_do_list_devices: Assertion `disk->disk_specific != ((void *)0)' failed.
| 
| Program received signal SIGABRT, Aborted.
| 0x00007ffff6fb7f25 in raise () from /lib/libc.so.6
| (gdb) bt
| #0  0x00007ffff6fb7f25 in raise () from /lib/libc.so.6
| #1  0x00007ffff6fbad60 in abort () from /lib/libc.so.6
| #2  0x00007ffff6fb104a in __assert_fail () from /lib/libc.so.6
| #3  0x00000000004086c7 in fdisk_do_list_devices (disk=0x641110) at fdisk.c:1332
| #4  0x000000000040ff0c in fdisk_interactive_mode (dev=0x7fffffffeb68, cmd_list=0x6162e0)
|     at ui.c:732
| #5  0x0000000000408743 in fdisk (argc=0, argv=0x7fffffffec70) at fdisk.c:2850
| #6  0x00007ffff6fa4a8d in __libc_start_main () from /lib/libc.so.6
| #7  0x00000000004040c9 in _start () at ../sysdeps/x86_64/elf/start.S:113
| (gdb)
`----

As I talked with Otavio on a private chat, I did suspect that we had a
NULL pointer dereference, and, sure it is there. For many versions already.
:-(


Regards, Rogério Brito.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-rc5-1-00468-g1836d95 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.utf-8, LC_CTYPE=pt_BR.utf-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gnu-fdisk depends on:
ii  dpkg              1.15.4.1               Debian package management system
ii  install-info      4.13a.dfsg.1-5         Manage installed documentation in 
ii  libc6             2.10.1-5               GNU C Library: Shared libraries
ii  libncurses5       5.7+20090803-2         shared libraries for terminal hand
ii  libparted1.8-12   1.8.8.git.2009.07.19-5 The GNU Parted disk partitioning s
ii  libreadline5      5.2-7                  GNU readline and history libraries
ii  libuuid1          2.16.1-4               Universally Unique ID library

gnu-fdisk recommends no packages.

gnu-fdisk suggests no packages.

-- no debconf information

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org





More information about the Parted-maintainers mailing list