Subject: bug#29051: Error in `parted': realloc(): invalid next size

From: Seth Finkelstein <[email-masked]>
Date: Fri, 17 Nov 2017 04:13:25 -0500

On Fri, Nov 03, 2017 at 08:43:22AM -0400, Phil Susi wrote:
> On 10/28/2017 11:35 PM, Seth Finkelstein wrote:
> > On the Samsung Galaxy TabPro S tablet, "parted /dev/sda print" crashes
> > with an error such as:
> > 
> > *** Error in `parted': realloc(): invalid next size: 0x000055cf7d3f3200 ***
> 
> Can you run dd if=/dev/sda of=dump count=64, then gzip dump, and post
> the resulting dump.gz file for analysis?

Here it is, in base64 format:

Also, here is a crash from a different system, Mageia 6 live x86_64:

# uname -a
Linux localhost 4.9.35-desktop-1.mga6 #1 SMP Thu Jun 29 19:27:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# parted /dev/sda print
Model: ATA LITEON CV1-8B128 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

*** Error in `parted': realloc(): invalid next size: 0x0000000001aaa370 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x72435)[0x7fa721459435]
/lib64/libc.so.6(+0x7e0a1)[0x7fa7214650a1]
/lib64/libc.so.6(realloc+0x184)[0x7fa7214660a4]
/lib64/libparted.so.2(xrealloc+0x16)[0x7fa721c4e096]
parted(table_render+0xac)[0x40cf6c]
parted[0x4076cd]
parted(non_interactive_mode+0x92)[0x40cb82]
parted(main+0x106f)[0x405fbf]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7fa721407600]
parted(_start+0x29)[0x406149]
======= Memory map: ========
00400000-00412000 r-xp 00000000 07:00 56556                              /usr/sbin/parted
00611000-00612000 r--p 00011000 07:00 56556                              /usr/sbin/parted
00612000-00613000 rw-p 00012000 07:00 56556                              /usr/sbin/parted
00613000-00614000 rw-p 00000000 00:00 0 
01a84000-01b4f000 rw-p 00000000 00:00 0                                  [heap]
7fa714000000-7fa714021000 rw-p 00000000 00:00 0 
7fa714021000-7fa718000000 ---p 00000000 00:00 0 
7fa71a0fd000-7fa71a113000 r-xp 00000000 07:00 31121                      /usr/lib64/libgcc_s-5.4.0.so.1
7fa71a113000-7fa71a312000 ---p 00016000 07:00 31121                      /usr/lib64/libgcc_s-5.4.0.so.1
7fa71a312000-7fa71a313000 r--p 00015000 07:00 31121                      /usr/lib64/libgcc_s-5.4.0.so.1
7fa71a313000-7fa71a314000 rw-p 00016000 07:00 31121                      /usr/lib64/libgcc_s-5.4.0.so.1
7fa71a314000-7fa7201eb000 r--p 00000000 07:00 164673                     /usr/share/locale/locale-archive
7fa7201eb000-7fa7201ee000 r-xp 00000000 07:00 30935                      /usr/lib64/libdl-2.22.so
7fa7201ee000-7fa7203ed000 ---p 00003000 07:00 30935                      /usr/lib64/libdl-2.22.so
7fa7203ed000-7fa7203ee000 r--p 00002000 07:00 30935                      /usr/lib64/libdl-2.22.so
7fa7203ee000-7fa7203ef000 rw-p 00003000 07:00 30935                      /usr/lib64/libdl-2.22.so
7fa7203ef000-7fa7204ee000 r-xp 00000000 07:00 31704                      /usr/lib64/libm-2.22.so
7fa7204ee000-7fa7206ed000 ---p 000ff000 07:00 31704                      /usr/lib64/libm-2.22.so
7fa7206ed000-7fa7206ee000 r--p 000fe000 07:00 31704                      /usr/lib64/libm-2.22.so
7fa7206ee000-7fa7206ef000 rw-p 000ff000 07:00 31704                      /usr/lib64/libm-2.22.so
7fa7206ef000-7fa720707000 r-xp 00000000 07:00 32065                      /usr/lib64/libpthread-2.22.so
7fa720707000-7fa720906000 ---p 00018000 07:00 32065                      /usr/lib64/libpthread-2.22.so
7fa720906000-7fa720907000 r--p 00017000 07:00 32065                      /usr/lib64/libpthread-2.22.so
7fa720907000-7fa720908000 rw-p 00018000 07:00 32065                      /usr/lib64/libpthread-2.22.so
7fa720908000-7fa72090c000 rw-p 00000000 00:00 0 
7fa72090c000-7fa720913000 r-xp 00000000 07:00 45346                      /usr/lib64/librt-2.22.so
7fa720913000-7fa720b12000 ---p 00007000 07:00 45346                      /usr/lib64/librt-2.22.so
7fa720b12000-7fa720b13000 r--p 00006000 07:00 45346                      /usr/lib64/librt-2.22.so
7fa720b13000-7fa720b14000 rw-p 00007000 07:00 45346                      /usr/lib64/librt-2.22.so
7fa720b14000-7fa720b4d000 r-xp 00000000 07:00 31787                      /usr/lib64/libncursesw.so.6.0
7fa720b4d000-7fa720d4c000 ---p 00039000 07:00 31787                      /usr/lib64/libncursesw.so.6.0
7fa720d4c000-7fa720d4d000 r--p 00038000 07:00 31787                      /usr/lib64/libncursesw.so.6.0
7fa720d4d000-7fa720d4e000 rw-p 00039000 07:00 31787                      /usr/lib64/libncursesw.so.6.0
7fa720d4e000-7fa720d52000 r-xp 00000000 07:00 45531                      /usr/lib64/libuuid.so.1.3.0
7fa720d52000-7fa720f51000 ---p 00004000 07:00 45531                      /usr/lib64/libuuid.so.1.3.0
7fa720f51000-7fa720f52000 r--p 00003000 07:00 45531                      /usr/lib64/libuuid.so.1.3.0
7fa720f52000-7fa720f53000 rw-p 00004000 07:00 45531                      /usr/lib64/libuuid.so.1.3.0
7fa720f53000-7fa720f8e000 r-xp 00000000 07:00 30724                      /usr/lib64/libblkid.so.1.1.0
7fa720f8e000-7fa72118d000 ---p 0003b000 07:00 30724                      /usr/lib64/libblkid.so.1.1.0
7fa72118d000-7fa721191000 r--p 0003a000 07:00 30724                      /usr/lib64/libblkid.so.1.1.0
7fa721191000-7fa721192000 rw-p 0003e000 07:00 30724                      /usr/lib64/libblkid.so.1.1.0
7fa721192000-7fa721193000 rw-p 00000000 00:00 0 
7fa721193000-7fa7211e2000 r-xp 00000000 07:00 30920                      /usr/lib64/libdevmapper.so.1.02
7fa7211e2000-7fa7213e2000 ---p 0004f000 07:00 30920                      /usr/lib64/libdevmapper.so.1.02
7fa7213e2000-7fa7213e3000 r--p 0004f000 07:00 30920                      /usr/lib64/libdevmapper.so.1.02
7fa7213e3000-7fa7213e6000 rw-p 00050000 07:00 30920                      /usr/lib64/libdevmapper.so.1.02
7fa7213e6000-7fa7213e7000 rw-p 00000000 00:00 0 
7fa7213e7000-7fa721590000 r-xp 00000000 07:00 30755                      /usr/lib64/libc-2.22.so
7fa721590000-7fa721790000 ---p 001a9000 07:00 30755                      /usr/lib64/libc-2.22.so
7fa721790000-7fa721794000 r--p 001a9000 07:00 30755                      /usr/lib64/libc-2.22.so
7fa721794000-7fa721796000 rw-p 001ad000 07:00 30755                      /usr/lib64/libc-2.22.so
7fa721796000-7fa72179a000 rw-p 00000000 00:00 0 
7fa72179a000-7fa7217cd000 r-xp 00000000 07:00 45486                      /usr/lib64/libtinfo.so.6.0
7fa7217cd000-7fa7219cd000 ---p 00033000 07:00 45486                      /usr/lib64/libtinfo.so.6.0
7fa7219cd000-7fa7219d1000 r--p 00033000 07:00 45486                      /usr/lib64/libtinfo.so.6.0
7fa7219d1000-7fa7219d2000 rw-p 00037000 07:00 45486                      /usr/lib64/libtinfo.so.6.0
7fa7219d2000-7fa7219d3000 rw-p 00000000 00:00 0 
7fa7219d3000-7fa721a13000 r-xp 00000000 07:00 32110                      /usr/lib64/libreadline.so.6.3
7fa721a13000-7fa721c13000 ---p 00040000 07:00 32110                      /usr/lib64/libreadline.so.6.3
7fa721c13000-7fa721c15000 r--p 00040000 07:00 32110                      /usr/lib64/libreadline.so.6.3
7fa721c15000-7fa721c1b000 rw-p 00042000 07:00 32110                      /usr/lib64/libreadline.so.6.3
7fa721c1b000-7fa721c1d000 rw-p 00000000 00:00 0 
7fa721c1d000-7fa721c61000 r-xp 00000000 07:00 31969                      /usr/lib64/libparted.so.2.0.1
7fa721c61000-7fa721e61000 ---p 00044000 07:00 31969                      /usr/lib64/libparted.so.2.0.1
7fa721e61000-7fa721e63000 r--p 00044000 07:00 31969                      /usr/lib64/libparted.so.2.0.1
7fa721e63000-7fa721e65000 rw-p 00046000 07:00 31969                      /usr/lib64/libparted.so.2.0.1
7fa721e65000-7fa721e69000 rw-p 00000000 00:00 0 
7fa721e69000-7fa721e89000 r-xp 00000000 07:00 30423                      /usr/lib64/ld-2.22.so
7fa72204b000-7fa722050000 rw-p 00000000 00:00 0 
7fa722050000-7fa72206d000 r-xp 00000000 07:00 45502                      /usr/lib64/libudev.so.1.6.4
7fa72206d000-7fa72206e000 ---p 0001d000 07:00 45502                      /usr/lib64/libudev.so.1.6.4
7fa72206e000-7fa72206f000 r--p 0001d000 07:00 45502                      /usr/lib64/libudev.so.1.6.4
7fa72206f000-7fa722070000 rw-p 0001e000 07:00 45502                      /usr/lib64/libudev.so.1.6.4
7fa722070000-7fa722073000 rw-p 00000000 00:00 0 
7fa72207e000-7fa722080000 rw-p 00000000 00:00 0 
7fa722080000-7fa722087000 r--s 00000000 07:00 29289                      /usr/lib64/gconv/gconv-modules.cache
7fa722087000-7fa722088000 rw-p 00000000 00:00 0 
7fa722088000-7fa722089000 r--p 0001f000 07:00 30423                      /usr/lib64/ld-2.22.so
7fa722089000-7fa72208a000 rw-p 00020000 07:00 30423                      /usr/lib64/ld-2.22.so
7fa72208a000-7fa72208b000 rw-p 00000000 00:00 0 
7ffc0fe3e000-7ffc0fe5f000 rw-p 00000000 00:00 0                          [stack]
7ffc0ff75000-7ffc0ff77000 r--p 00000000 00:00 0                          [vvar]
7ffc0ff77000-7ffc0ff79000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)