parted stack smashing

Bug #229388 reported by DaveAbrahams
8
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Invalid
High
Colin Watson

Bug Description

Binary package hint: parted

In Hardy with all updates:

(parted) mklabel msdos
*** stack smashing detected ***: <unknown> terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7e83138]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7e830f0]
/lib/libparted-1.7.so.1[0xb7f9e614]
/lib/libparted-1.7.so.1[0xb7f8dc18]
[0x0]
======= Memory map: ========
08048000-08056000 r-xp 00000000 fe:02 34665 /sbin/parted
08056000-08057000 rw-p 0000e000 fe:02 34665 /sbin/parted
08057000-08078000 rw-p 08057000 00:00 0 [heap]
b7c54000-b7c5e000 r-xp 00000000 fe:02 114793 /lib/libgcc_s.so.1
b7c5e000-b7c5f000 rw-p 0000a000 fe:02 114793 /lib/libgcc_s.so.1
b7c6e000-b7c6f000 rw-p b7c6e000 00:00 0
b7c6f000-b7cae000 r--p 00000000 fe:02 254017 /usr/lib/locale/en_US.utf8/LC_CTYPE
b7cae000-b7caf000 r--p 00000000 fe:02 254018 /usr/lib/locale/en_US.utf8/LC_NUMERIC
b7caf000-b7cb0000 r--p 00000000 fe:02 254019 /usr/lib/locale/en_US.utf8/LC_TIME
b7cb0000-b7d91000 r--p 00000000 fe:02 254020 /usr/lib/locale/en_US.utf8/LC_COLLATE
b7d91000-b7d92000 rw-p b7d91000 00:00 0
b7d92000-b7d95000 r-xp 00000000 fe:02 114756 /lib/libuuid.so.1.2
b7d95000-b7d96000 rw-p 00002000 fe:02 114756 /lib/libuuid.so.1.2
b7d96000-b7edf000 r-xp 00000000 fe:02 180282 /lib/tls/i686/cmov/libc-2.7.so
b7edf000-b7ee0000 r--p 00149000 fe:02 180282 /lib/tls/i686/cmov/libc-2.7.so
b7ee0000-b7ee2000 rw-p 0014a000 fe:02 180282 /lib/tls/i686/cmov/libc-2.7.so
b7ee2000-b7ee5000 rw-p b7ee2000 00:00 0
b7ee5000-b7f12000 r-xp 00000000 fe:02 127020 /lib/libncurses.so.5.6
b7f12000-b7f15000 rw-p 0002c000 fe:02 127020 /lib/libncurses.so.5.6
b7f15000-b7f17000 r-xp 00000000 fe:02 180285 /lib/tls/i686/cmov/libdl-2.7.so
b7f17000-b7f19000 rw-p 00001000 fe:02 180285 /lib/tls/i686/cmov/libdl-2.7.so
b7f19000-b7f1a000 rw-p b7f19000 00:00 0
b7f1a000-b7f46000 r-xp 00000000 fe:02 204821 /lib/libreadline.so.5.2
b7f46000-b7f4a000 rw-p 0002c000 fe:02 204821 /lib/libreadline.so.5.2
b7f4a000-b7f4b000 rw-p b7f4a000 00:00 0
b7f4b000-b7fa9000 r-xp 00000000 fe:02 34455 /lib/libparted-1.7.so.1.0.0
b7fa9000-b7fab000 rw-p 0005d000 fe:02 34455 /lib/libparted-1.7.so.1.0.0
b7fab000-b7fac000 rw-p b7fab000 00:00 0
b7fac000-b7fad000 r--p 00000000 fe:02 254021 /usr/lib/locale/en_US.utf8/LC_MONETARY
b7fad000-b7fae000 r--p 00000000 fe:02 253957 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
b7fae000-b7faf000 r--p 00000000 fe:02 254022 /usr/lib/locale/en_US.utf8/LC_PAPER
b7faf000-b7fb0000 r--p 00000000 fe:02 254023 /usr/lib/locale/en_US.utf8/LC_NAME
b7fb0000-b7fb1000 r--p 00000000 fe:02 254024 /usr/lib/locale/en_US.utf8/LC_ADDRESS
b7fb1000-b7fb2000 r--p 00000000 fe:02 254025 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
b7fb2000-b7fb3000 r--p 00000000 fe:02 254026 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
b7fb3000-b7fba000 r--s 00000000 fe:02 24623 /usr/lib/gconv/gconv-modules.cache
b7fba000-b7fbb000 r--p 00000000 fe:02 254027 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION

Revision history for this message
Helminthe (helminthe) wrote :

Can confirm, same error on Hardy, while trying to format an USB flash drive. fdisk works correctly, while parted and gparted insist that the drive has an "unrecognised disk label", and crash when trying to add one.

Changed in parted:
status: New → Confirmed
Revision history for this message
Helminthe (helminthe) wrote :

 The same problem affects syslinux too, sevearl hits in Google suggesting that
#1 it's a known issue for developers of both applications
#2 it affects large external USB disks e.g, iPods who are formatted with a sector size > 512
#3 it's not trivially fixed

Revision history for this message
Colin Watson (cjwatson) wrote :

Could I get a dump of the partition table, please? The output of 'sudo od -tx1 -Ax -N512 /dev/sda' (or /dev/sdb, or whatever the device in question is) should be sufficient.

Changed in parted:
assignee: nobody → kamion
status: Confirmed → Incomplete
importance: Undecided → High
Revision history for this message
Artesia (rachsy) wrote :

Here's the requested output of my iPod. I have the same bug and am unable to create a disk label.

000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0001c0 01 00 ee fe ff ff 01 00 00 00 96 73 53 02 00 00
0001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
000200

Revision history for this message
Jyri Sillanpaa (ubuntu-amorco) wrote :

The problem continues with Ubuntu Intrepid, parted (GNU parted) 1.8.9

Revision history for this message
Colin Watson (cjwatson) wrote :

Sarah: Thanks for this. It turns out that this iPod disk is laid out using GPT (a more modern partition table format), and so the 512 bytes I asked for don't cover the whole partition table. Sorry about this. Could you repeat the previous directions, but with the following command instead:

  sudo od -tx1 -Ax -N17408 /dev/sda

Changed in parted:
status: Incomplete → Invalid
Revision history for this message
kima (kima) wrote :
Download full text (4.6 KiB)

Same problem with Ubuntu 9.04 and parted 1.8.8 :
(when trying to create a fat32 partition in an old usb key)

(parted) mkpartfs
Type de partition ? primary/primaire/extended/étendue? primary
Type de système de fichiers ? [ext2]? fat32
Début ? 0
Fin ? 1022
Avertissement: Vous avez demander de créer une partition de 0,00B à 1022MB.
Le plus près que Parted peut traiter est 129kB à 1020MB. Est ce que cela est
acceptable pour vous ?
Oui/Yes/Non/No? O
*** stack smashing detected ***: <unknown> terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7e56da8]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7e56d60]
/lib/libparted-1.8.so.10[0xb7f76854]
/lib/libparted-1.8.so.10[0xb7f459fd]
[0x0]
======= Memory map: ========
08048000-0805b000 r-xp 00000000 08:09 243950 /sbin/parted
0805b000-0805c000 r--p 00012000 08:09 243950 /sbin/parted
0805c000-0805d000 rw-p 00013000 08:09 243950 /sbin/parted
09383000-093c4000 rw-p 09383000 00:00 0 [heap]
b7b9b000-b7ba8000 r-xp 00000000 08:09 406465 /lib/libgcc_s.so.1
b7ba8000-b7ba9000 r--p 0000c000 08:09 406465 /lib/libgcc_s.so.1
b7ba9000-b7baa000 rw-p 0000d000 08:09 406465 /lib/libgcc_s.so.1
b7bba000-b7bbb000 rw-p b7bba000 00:00 0
b7bbb000-b7bdd000 r--p 00000000 08:09 385687 /usr/share/locale-langpack/fr/LC_MESSAGES/libc.mo
b7bdd000-b7bf1000 r--p 00000000 08:09 385755 /usr/share/locale-langpack/fr/LC_MESSAGES/parted.mo
b7bf1000-b7c30000 r--p 00000000 08:09 301366 /usr/lib/locale/fr_FR.utf8/LC_CTYPE
b7c30000-b7c31000 r--p 00000000 08:09 301678 /usr/lib/locale/fr_FR.utf8/LC_NUMERIC
b7c31000-b7d1c000 r--p 00000000 08:09 301365 /usr/lib/locale/fr_FR.utf8/LC_COLLATE
b7d1c000-b7d1d000 rw-p b7d1c000 00:00 0
b7d1d000-b7d35000 r-xp 00000000 08:09 406529 /lib/libselinux.so.1
b7d35000-b7d36000 r--p 00017000 08:09 406529 /lib/libselinux.so.1
b7d36000-b7d37000 rw-p 00018000 08:09 406529 /lib/libselinux.so.1
b7d37000-b7d38000 rw-p b7d37000 00:00 0
b7d38000-b7d3b000 r-xp 00000000 08:09 406554 /lib/libuuid.so.1.2
b7d3b000-b7d3c000 r--p 00002000 08:09 406554 /lib/libuuid.so.1.2
b7d3c000-b7d3d000 rw-p 00003000 08:09 406554 /lib/libuuid.so.1.2
b7d3d000-b7d52000 r-xp 00000000 08:09 406456 /lib/libdevmapper.so.1.02.1
b7d52000-b7d53000 r--p 00014000 08:09 406456 /lib/libdevmapper.so.1.02.1
b7d53000-b7d55000 rw-p 00015000 08:09 406456 /lib/libdevmapper.so.1.02.1
b7d55000-b7d57000 r-xp 00000000 08:09 703 /lib/tls/i686/cmov/libdl-2.9.so
b7d57000-b7d58000 r--p 00001000 08:09 703 /lib/tls/i686/cmov/libdl-2.9.so
b7d58000-b7d59000 rw-p 00002000 08:09 703 /lib/tls/i686/cmov/libdl-2.9.so
b7d59000-b7eb5000 r-xp 00000000 08:09 700 /lib/tls/i686/cmov/libc-2.9.so
b7eb5000-b7eb6000 ---p 0015c000 08:09 700 /lib/tls/i686/cmov/libc-2.9.so
b7eb6000-b7eb8000 r--p 0015c000 08:09 700 /lib/tls/i686/cmov/libc-2.9.so
b7eb8000-b7eb9000 rw-p 0015e000 08:09 700 /lib/tls/i686/cmov/libc-2.9.so
b7eb9000...

Read more...

Revision history for this message
kima (kima) wrote :

The same manipulation, another error message :

iop@iop-pc:~$ sudo parted
GNU Parted 1.8.8
Utilisation de /dev/sda
Bienvenu dans GNU Parted ! Tapez "help" pour voir la liste des commandes.
(parted) select /dev/sdd
Utilisation de /dev/sdd
(parted) print
Modèle: CBM Flash Disk (scsi)
Disque /dev/sdd : 1022MB
Taille des secteurs (logique/physique) : 2048o/512o
Table de partitions : msdos

Numéro Début Fin Taille Type Système de fichiers Fanions

(parted) mkpartfs
Type de partition ? primary/primaire/extended/étendue? primary
Type de système de fichiers ? [ext2]? fat32
Début ? 0
Fin ? 1022
Avertissement: Vous avez demander de créer une partition de 0,00B à 1022MB.
Le plus près que Parted peut traiter est 129kB à 1020MB. Est ce que cela est acceptable pour vous ?
Oui/Yes/Non/No? Yes

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
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 visit the GNU Parted website:

 http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (1.8.8)
along with the error message below, the output of

 parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Historique des commandes:
select /dev/sdd
print
mkpartfs
primary
fat32
0
1022
Yes

Erreur : SEGV_MAPERR (l'adresse n'est pas associée à un objet)
Abandon

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.