Debian Bug report logs - #463720
gnu-fdisk: reproducible Segmentation fault

version graph

Package: gnu-fdisk; Maintainer for gnu-fdisk is Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>; Source for gnu-fdisk is src:gnu-fdisk.

Reported by: Géraud Meyer <geraud_meyer@hotmail.com>

Date: Sat, 2 Feb 2008 18:18:02 UTC

Severity: normal

Found in versions gnu-fdisk/1.0-1, gnu-fdisk/1.1-1

Fixed in version gnu-fdisk/1.2-1

Done: Xavier Oswald <x.oswald@free.fr>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Julien Louis <ptitlouis@sysif.net>:
Bug#463720; Package gnu-fdisk. Full text and rfc822 format available.

Acknowledgement sent to Géraud Meyer <geraud_meyer@hotmail.com>:
New Bug report received and forwarded. Copy sent to Julien Louis <ptitlouis@sysif.net>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Géraud Meyer <geraud_meyer@hotmail.com>
To: submit@bugs.debian.org
Subject: gnu-fdisk: reproducible Segmentation fault
Date: Sat, 02 Feb 2008 19:33:05 +0100
Package: gnu-fdisk
Version: 1.0-1
Severity: normal

The following error happens with the other disks as well. /dev/sda has
DOS partitions.

# fdisk /dev/sda
GNU Fdisk 1.0
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.

Using /dev/sda
Command (m for help): s                                                  
Warning: Partition(s) on /dev/sda are being used.                        
   i   Ignore                                                            
   c   Cancel
c
Command (m for help): q                                                  
You found a bug in GNU Fdisk.                                            
This may have been fixed in the last version of GNU Parted that you can
find at:
    http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check, please
email:
    bug-parted@gnu.org
or (preferably) file a bug report at:
    http://parted.alioth.debian.org/bugs/

Your report should contain the version of this release (1.0) along with the
error message below, the output of
    parted DEVICE unit co print unit s print
and additional information about your setup you consider important.

Assertion (dev != NULL) at ../../libparted/device.c:264 in function
ped_device_close() failed.
   i   Ignore                                                            
   c   Cancel
i
Segmentation fault
#


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (850, 'testing'), (760, 'stable'), (10,
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-desk3-k7 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gnu-fdisk depends on:
ii  libc6                     2.7-6          GNU C Library: Shared libraries
ii  libncurses5               5.6+20080119-1 Shared libraries for
terminal hand
ii  libparted1.7-1            1.7.1-5.1      The GNU Parted disk
partitioning s
ii  libuuid1                  1.40.5-2       universally unique id library

gnu-fdisk recommends no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>:
Bug#463720; Package gnu-fdisk. (Sat, 20 Dec 2008 14:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arthur Marsh <arthur.marsh@internode.on.net>:
Extra info received and forwarded to list. Copy sent to Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>. (Sat, 20 Dec 2008 14:51:03 GMT) Full text and rfc822 format available.

Message #10 received at 463720@bugs.debian.org (full text, mbox):

From: Arthur Marsh <arthur.marsh@internode.on.net>
To: Debian Bug Tracking System <463720@bugs.debian.org>
Subject: gnu-fdisk: gfdisk -l /dev/sda segfaults; sfdisk -l /dev/sda ok
Date: Sun, 21 Dec 2008 01:19:33 +1030
Package: gnu-fdisk
Version: 1.1-1
Followup-For: Bug #463720


when I run gfdisk -l /dev/sda I get a segfault:

_llseek(3, 2146830336, [2146830336], SEEK_SET) = 0
read(3, 
"\353X\220MSWIN4.1\0\2\10(\0\2\0\0\0\0\370\0\0?\0\377\0\4\373?\0K"..., 
512) = 512
_llseek(3, 32256, [32256], SEEK_SET)    = 0
read(3, 
"\353<\220MSWIN4.1\0\2@A\0\2\0\2\0\0\370\0\1?\0\377\0?\0\0\0\206"..., 
512) = 512
write(1, "\n"..., 1
)                    = 1
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

The "other" fdisk, reports:

sfdisk -l /dev/sda

Disk /dev/sda: 1019 cylinders, 134 heads, 62 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 1019/134/62).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 
0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+    260     261-   2096451    6  FAT16
/dev/sda2        261     526     266    2136645    f  W95 Ext'd (LBA)
                end: (c,h,s) expected (526,254,63) found (525,254,63)
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5        261+    526     266-   2136613+   b  W95 FAT32

The hard disk is reported as:

EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.
EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, ip:y, ep:n, pp:y.
EATA0: 2.0C, PCI 0xe010, IRQ 5, BMST, SG 122, MB 64.
EATA0: wide SCSI support enabled, max_id 16, max_lun 8.
EATA0: SCSI channel 0 enabled, host target ID 7.
scsi1 : EATA/DMA 2.0x rev. 8.10.00
scsi 1:0:6:0: Direct-Access     IBM      DCAS-34330W      S65A PQ: 0 
ANSI: 2
scsi 1:0:6:0: cmds/lun 16, sorted, simple tags.
sd 1:0:6:0: [sda] 8466688 512-byte hardware sectors (4335 MB)
sd 1:0:6:0: [sda] Write Protect is off
sd 1:0:6:0: [sda] Mode Sense: b3 00 00 08
sd 1:0:6:0: [sda] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA
sd 1:0:6:0: [sda] 8466688 512-byte hardware sectors (4335 MB)
sd 1:0:6:0: [sda] Write Protect is off
sd 1:0:6:0: [sda] Mode Sense: b3 00 00 08
sd 1:0:6:0: [sda] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA
 sda: sda1 sda2 < sda5 >
sd 1:0:6:0: [sda] Attached SCSI disk

Please also note that I get lock-ups loading eata on 2.6.23 and later 
kernels, but can load eata on 2.6.18 and 2.6.22 kernels successfully.

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

Kernel: Linux 2.6.22-git1 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gnu-fdisk depends on:
ii  libc6          2.7-16                    GNU C Library: Shared libraries
ii  libncurses5    5.7+20081213-1            shared libraries for terminal hand
ii  libparted1.8-1 1.8.8.git.2008.03.24-11.1 The GNU Parted disk partitioning s
ii  libreadline5   5.2-3                     GNU readline and history libraries
ii  libuuid1       1.41.3-1                  universally unique id library

gnu-fdisk recommends no packages.

gnu-fdisk suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>:
Bug#463720; Package gnu-fdisk. (Mon, 22 Dec 2008 17:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arthur Marsh <arthur.marsh@internode.on.net>:
Extra info received and forwarded to list. Copy sent to Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>. (Mon, 22 Dec 2008 17:51:02 GMT) Full text and rfc822 format available.

Message #15 received at 463720@bugs.debian.org (full text, mbox):

From: Arthur Marsh <arthur.marsh@internode.on.net>
To: 463720@bugs.debian.org
Subject: dmesg reports
Date: Tue, 23 Dec 2008 04:19:46 +1030
Hi, when trying to run gfdisk or lfdisk on /dev/sda, I received the 
following messages:

[  222.575704] fdisk[1996]: segfault at 60 ip 41b6d443 sp bff98034 error 
4 in libc-2.7.so[41af7000+155000]
[  249.063672] lfdisk[1998]: segfault at 60 ip 41b6d443 sp bfe50084 
error 4 in libc-2.7.so[41af7000+155000]




Information forwarded to debian-bugs-dist@lists.debian.org, Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>:
Bug#463720; Package gnu-fdisk. (Sun, 28 Dec 2008 17:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arthur Marsh <arthur.marsh@internode.on.net>:
Extra info received and forwarded to list. Copy sent to Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>. (Sun, 28 Dec 2008 17:45:02 GMT) Full text and rfc822 format available.

Message #20 received at 463720@bugs.debian.org (full text, mbox):

From: Arthur Marsh <arthur.marsh@internode.on.net>
To: Christian <mail.kristian@yahoo.it>
Cc: 463720@bugs.debian.org
Subject: Re: [bug-fdisk] Debian bug 463720 - segfault using /dev/sda [SOLUTION]
Date: Mon, 29 Dec 2008 04:14:22 +1030
Thanks, the patch worked:

ls -al `which fdisk`
-rwxr-xr-x 1 root root 84640 2008-12-29 04:08 /sbin/fdisk
victoria:/usr/src/sound# fdisk -l /dev/sda
GNU Fdisk 1.1
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.


Disk /dev/sda: 4 GB, 4334722560 bytes
255 heads, 63 sectors/track, 527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         261     2096451    6  FAT16
/dev/sda2             262         527     2128612    f  Extended LBA
/dev/sda5             262         527     2128612    b  FAT32
Warning: Partition 5 does not end on cylinder boundary.


Christian wrote, on 2008-12-29 00:47:
> 
>>    ~/# ./fdisk -l /dev/hda
>>    GNU Fdisk 1.1
>>    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.
>>
>>    Floating point exception
>>
>> I will examine it tomorrow and try to fix the bug.
>>
>> Thank's for report!!! :)
>>
>> Christian.
>>
>>
>>
>>
>> _______________________________________________
>> Bug-fdisk mailing list
>> Bug-fdisk@gnu.org
>> http://lists.gnu.org/mailman/listinfo/bug-fdisk
>>
> Stupid bug! :)
> 
> Solution is very simple: change "src/ui.c" line 720:
> 
>    fdisk_do_list_devices(&disk);
> 
> removing the `&' operator:
> 
>    fdisk_do_list_devices(disk);
> 
> After recompiling GNU fdisk we have:
> 
>    ~/# ./fdisk -l /dev/hda
>    GNU Fdisk 1.1
>    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.
> 
> 
>    Disk /dev/hda: 30 GB, 30014046720 bytes
>    255 heads, 63 sectors/track, 3649 cylinders
>    Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>       Device Boot      Start         End      Blocks   Id  System
>    /dev/hda1   *           1        1825    14659281    c  Linux
>    /dev/hda2            1826        2434     4883760   83  Linux
>    /dev/hda3            2435        2497      498015   82  Linux swap
>    /dev/hda4            2498        3649     9245407   83  Linux
>    ~/#
> 
> Happy partition lists! ;)
> 
> Christian.
> 
> 
> 
> _______________________________________________
> Bug-fdisk mailing list
> Bug-fdisk@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-fdisk
> 




Reply sent to Xavier Oswald <x.oswald@free.fr>:
You have taken responsibility. (Wed, 04 Feb 2009 02:58:29 GMT) Full text and rfc822 format available.

Notification sent to Géraud Meyer <geraud_meyer@hotmail.com>:
Bug acknowledged by developer. (Wed, 04 Feb 2009 02:58:48 GMT) Full text and rfc822 format available.

Message #25 received at 463720-close@bugs.debian.org (full text, mbox):

From: Xavier Oswald <x.oswald@free.fr>
To: 463720-close@bugs.debian.org
Subject: Bug#463720: fixed in gnu-fdisk 1.2-1
Date: Wed, 04 Feb 2009 02:47:05 +0000
Source: gnu-fdisk
Source-Version: 1.2-1

We believe that the bug you reported is fixed in the latest version of
gnu-fdisk, which is due to be installed in the Debian FTP archive:

gnu-fdisk_1.2-1.diff.gz
  to pool/main/g/gnu-fdisk/gnu-fdisk_1.2-1.diff.gz
gnu-fdisk_1.2-1.dsc
  to pool/main/g/gnu-fdisk/gnu-fdisk_1.2-1.dsc
gnu-fdisk_1.2-1_i386.deb
  to pool/main/g/gnu-fdisk/gnu-fdisk_1.2-1_i386.deb
gnu-fdisk_1.2.orig.tar.gz
  to pool/main/g/gnu-fdisk/gnu-fdisk_1.2.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 463720@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Xavier Oswald <x.oswald@free.fr> (supplier of updated gnu-fdisk package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 23 Dec 2008 20:42:51 +0100
Source: gnu-fdisk
Binary: gnu-fdisk
Architecture: source i386
Version: 1.2-1
Distribution: unstable
Urgency: high
Maintainer: Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>
Changed-By: Xavier Oswald <x.oswald@free.fr>
Description: 
 gnu-fdisk  - Linux fdisk replacement based on libparted
Closes: 445304 463720 504747 512751
Changes: 
 gnu-fdisk (1.2-1) unstable; urgency=high
 .
   * New upstream release (Closes: #512751)
   * Fix inoperability for disks with unknown disklabel (Closes: #445304)
   * Fix wipes out MBR when used on GPT partitions(Closes: #504747)
   * Fix Segmentation fault (Closes: #463720)
   * Add Build-Depends on texinfo in debian/control
   * Rename debian/patches/pointer to debian/patches/pointer.patch
   * Add debian/pateches/mkinstalldirs.patch for adding the missing
     mkinstalldirs command
   * Update copyright about licences location
   * Remove leftover .pc/.version
Checksums-Sha1: 
 7c6ad4ccf78cfeef418ab8e1d5d3c98ede30b4d3 1208 gnu-fdisk_1.2-1.dsc
 67281e6bc4c12a7553982306d38775a22fded1ae 419344 gnu-fdisk_1.2.orig.tar.gz
 752676e71fba866d933c39ae3513202d5e5396ca 357865 gnu-fdisk_1.2-1.diff.gz
 802e8f96f692eee6e99ab9a8160b75e60c5f01cc 109556 gnu-fdisk_1.2-1_i386.deb
Checksums-Sha256: 
 ed4d0c81f9598529564e65ad9578aabb56445d79e1182fbee5d6f059d70546f8 1208 gnu-fdisk_1.2-1.dsc
 1edef1730243cd40b8cd93e8a561c5056cec62f17c3f7e17b23600aae45d7ebd 419344 gnu-fdisk_1.2.orig.tar.gz
 642f97acb794e61e7e8cfb5794e2011a23f8f0888158cb53c946f4237017a3af 357865 gnu-fdisk_1.2-1.diff.gz
 34c7cf3f5142ada3d3e1a5aff331c5bbf65d09256b21515ee0b52cbc30f6f9c8 109556 gnu-fdisk_1.2-1_i386.deb
Files: 
 55e1b7bdb9bb12e7e4d9a970c557319d 1208 utils extra gnu-fdisk_1.2-1.dsc
 afbbdbe2693e72f5a8d00209d515a838 419344 utils extra gnu-fdisk_1.2.orig.tar.gz
 6e8ef4f1b8f258a6b9d9f79f62a22444 357865 utils extra gnu-fdisk_1.2-1.diff.gz
 c6529dea0ac62a2c5230bf0d36a33ddd 109556 utils extra gnu-fdisk_1.2-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmI/iYACgkQpDDGqoi7tR4FmwCgsXX1judDRYYHtY9I2l05XGDZ
iQ8AoI0desqm6pdVzbKIkbasVf3KZxOC
=u5Md
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 12 Mar 2009 07:28:38 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 04:17:46 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.