GParted crashed when trying to probe an encrypted partition containing content that libparted doesn't recognise
This effects current GIT master. Commit 1adb28b0 "Also use libparted to probe for encrypted file systems (#148 (closed))".
Create a LUKS encrypted partition and open it. Either leave the contents alone or create a file system which libparted doesn't recognise. (Examples: exfat, f2fs, lvm2 pv, minix, reiser4).
# echo -n badpassword | cryptsetup luksFormat /dev/sdb11
# echo -n badpassword | cryptsetup luksOpen /dev/sdb11 sdb11_crypt
# ./gpartedbin /dev/sdb
GParted 1.2.0-git
configuration (none)
libparted 3.1
/dev/mapper/sdb11_crypt: unrecognised disk label
Segmentation fault (core dumped)
# lvm pvcreate /dev/mapper/sdb11_crypt
# ./gpartedbin /dev/sdb
GParted 1.2.0-git
configuration (none)
libparted 3.1
/dev/mapper/sdb11_crypt: unrecognised disk label
Segmentation fault (core dumped)
Backtrace:
(gdb) backtrace
#0 0x0000000000460f68 in GParted::GParted_Core::detect_filesystem(_PedDevice*, _PedPartition*, std::vector<Glib::ustring, std::allocator<Glib::ustring> >&) (lp_device=0x0, lp_partition=0x0, messages=std::vector of length 0, capacity 0)
at GParted_Core.cc:1235
#1 0x00000000004615a6 in GParted::GParted_Core::detect_filesystem_in_encryption_mapping(Glib::ustring const&, std::vector<Glib::ustring, std::allocator<Glib::ustring> >&) (path=..., messages=std::vector of length 0, capacity 0)
at GParted_Core.cc:1096
#2 0x00000000004647c8 in GParted::GParted_Core::set_luks_partition(GParted::PartitionLUKS&) (this=this@entry=0x7fff43f974e0, partition=...) at GParted_Core.cc:1011
#3 0x000000000046511b in GParted::GParted_Core::set_device_partitions(GParted::Device&, _PedDevice*, _PedDisk*) (this=this@entry=0x7fff43f974e0, device=..., lp_device=0x7efc780008c0, lp_disk=0x7efc78000d10) at GParted_Core.cc:883
#4 0x00000000004658e3 in GParted::GParted_Core::set_device_from_disk(GParted::Device&, Glib::ustring const&) (this=this@entry=0x7fff43f974e0, device=..., device_path=...) at GParted_Core.cc:704
#5 0x0000000000465fff in GParted::GParted_Core::set_devices_thread(std::vector<GParted::Device, std::allocator<GParted::Device> >*) (this=0x7fff43f974e0, pdevices=0x7fff43f96bc8) at GParted_Core.cc:266
#6 0x00007efc99ba413d in call_thread_entry_slot () at /lib64/libglibmm-2.4.so.1
#7 0x00007efc97dc8555 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#8 0x00007efc96ab4ea5 in start_thread () at /lib64/libpthread.so.0
#9 0x00007efc967dd9fd in clone () at /lib64/libc.so.6
I broke this with the afore mentioned commit 1adb28b0. I stepped on a coding landmine. I'm working on the fix.
Edited by Mike Fleetwood