Description of problem: On some binaries, notably kubectl, upx segfaults if it's been asked to preserve the build-id. Version-Release number of selected component (if applicable): 3.96-2.fc31 How reproducible: 100% Steps to Reproduce: 1. dnf install upx kubernetes-client 2. cd /tmp 3. cp /usr/bin/kubectl . 4. upx --preserve-build-id kubectl Actual results: Ultimate Packer for eXecutables Copyright (C) 1996 - 2020 UPX 3.96 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020 File size Ratio Format Name -------------------- ------ ----------- ----------- Segmentation fault (core dumped) Expected results: Ultimate Packer for eXecutables Copyright (C) 1996 - 2020 UPX 3.96 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020 File size Ratio Format Name -------------------- ------ ----------- ----------- 146455080 -> 38386108 26.21% linux/amd64 kubectl Packed 1 file. Additional info: The segfault is caused by a NULL-dereference: in ::pack1 (src/p_lx_elf.cpp), in the block handling o_unix.preserve_build_id, sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; results in sec_strndx being NULL, so char *strtab = New(char, sec_strndx->sh_size); blows up. The backtrace is #0 PackLinuxElf64::pack1 (this=this@entry=0x5cd2c0, fo=fo@entry=0x7fffffffccd0) at p_lx_elf.cpp:3770 #1 0x0000000000433323 in PackLinuxElf64amd::pack1 (this=0x5cd2c0, fo=0x7fffffffccd0, ft=...) at p_lx_elf.cpp:3804 #2 0x0000000000453dc3 in PackUnix::pack (this=0x5cd2c0, fo=0x7fffffffccd0) at p_unix.cpp:306 #3 0x00000000004630c9 in Packer::doPack (this=0x5cd2c0, fo=0x7fffffffccd0) at packer.cpp:100 #4 0x00000000004684c6 in PackMaster::pack (this=<optimized out>, fo=<optimized out>) at packmast.cpp:262 #5 0x000000000047a713 in do_one_file (iname=0x7fffffffdcc6 "hyperkube", oname=0x7fffffffd350 "hyperkube.000") at work.cpp:158 #6 0x000000000047a9c7 in do_files (i=<optimized out>, i@entry=2, argc=<optimized out>, argv=<optimized out>) at work.cpp:271 #7 0x0000000000407a8c in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:1539
FEDORA-2020-4eb44f03d1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4eb44f03d1
FEDORA-EPEL-2020-9246dec392 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9246dec392
FEDORA-2020-0c757bc702 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0c757bc702
FEDORA-EPEL-2020-daf85703e8 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-daf85703e8
FEDORA-EPEL-2020-9246dec392 has been pushed to the Fedora EPEL 8 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9246dec392 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-daf85703e8 has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-daf85703e8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-4eb44f03d1 has been pushed to the Fedora 30 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4eb44f03d1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4eb44f03d1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-45eee13072 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-45eee13072` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-45eee13072 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-4eb44f03d1 has been pushed to the Fedora 30 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-45eee13072 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-0c757bc702 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-9246dec392 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-daf85703e8 has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report.