Created attachment 9812 [details] Crashing input Dear all, This bug was found with AFLGo, a directed version of AFL/AFLFast. Thanks also to Marcel Böhme. This bug was found on Ubuntu 14.04 64-bit & binutils was checkout from main repository at git://sourceware.org/git/binutils-gdb.git. Its commit is 53f7e8ea7fad1fcff1b58f4cbd74e192e0bcbc1d (Fri Feb 10 00:00:16 2017) binutils was built with ASAN using gcc-6.2 and clang-3.4. The configure command was: CC=clang CFLAGS="-DFORTIFY_SOURCE=2 -fstack-protector-all -fsanitize=undefined,address -fno-omit-frame-pointer -g -Wno-error" ../configure --disable-shared --disable-gdb --disable-libdecnumber --disable-readline --disable-sim To reproduce: Download the attached file - bug_11 readelf -w bug_11 Valgrind says: ==59939== Invalid read of size 8 ==59939== at 0x408F15: target_specific_reloc_handling (readelf.c:11675) ==59939== by 0x408F15: apply_relocations (readelf.c:12343) ==59939== by 0x40B133: load_specific_debug_section (readelf.c:12905) ==59939== by 0x42384B: display_debug_section (readelf.c:13009) ==59939== by 0x42384B: process_section_contents (readelf.c:13091) ==59939== by 0x42384B: process_object (readelf.c:16780) ==59939== by 0x402111: process_file (readelf.c:17154) ==59939== by 0x402111: main (readelf.c:17225) ==59939== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==59939== ==59939== ==59939== Process terminating with default action of signal 11 (SIGSEGV) ==59939== Access not within mapped region at address 0x0 ==59939== at 0x408F15: target_specific_reloc_handling (readelf.c:11675) ==59939== by 0x408F15: apply_relocations (readelf.c:12343) ==59939== by 0x40B133: load_specific_debug_section (readelf.c:12905) ==59939== by 0x42384B: display_debug_section (readelf.c:13009) ==59939== by 0x42384B: process_section_contents (readelf.c:13091) ==59939== by 0x42384B: process_object (readelf.c:16780) ==59939== by 0x402111: process_file (readelf.c:17154) ==59939== by 0x402111: main (readelf.c:17225) ASAN says: ==44698==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000054b47b sp 0x7ffebb728f20 bp 0x7ffebb7293f0 T0) #0 0x54b47a in target_specific_reloc_handling /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:11674 #1 0x52e6dc in apply_relocations /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:12343 #2 0x4846b5 in load_specific_debug_section /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:12905 #3 0x564b4c in display_debug_section /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:13009 #4 0x4e194f in process_section_contents /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:13091 #5 0x48d610 in process_object /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:16780 #6 0x488365 in process_file /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:17154 #7 0x4855c3 in main /home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:17225 #8 0x7ff9ef5a4f44 (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) #9 0x47ddfc in _start (/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/readelf+0x47ddfc)
Another duplicate bug. *** This bug has been marked as a duplicate of bug 21139 ***