https://sourceware.org/bugzilla/show_bug.cgi?id=30891
Bug ID: 30891 Summary: objdump: SEGV /home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9543 in _bfd_elf_slurp_version_tables Product: binutils Version: 2.42 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: yan.cs10 at nycu dot edu.tw Target Milestone: --- Created attachment 15130 --> https://sourceware.org/bugzilla/attachment.cgi?id=15130&action=edit this poc with -T argument can crash objdump in the latest version Summary: A crash caused when using objdump AddressSanitizer reported it as SEGV git commit, OS, Compiler and processor git commit: be8e83130 gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Ubuntu 20.04.4 LTS AMD Ryzen 5 3600X 6-Core Processor Steps to reproduce: $ cd binutils-gdb $ export CFLAGS='-fsanitize=address -fsanitize-recover=address -g3' $ export CXXFLAGS='-fsanitize=address -fsanitize-recover=address -g3' $ make $ binutils/objdump -T ./poc_25 AddressSanitizer report: $ /home/pt/sytseng/binutils-gdb-asan/binutils/objdump -T ./poc_25 BFD: warning: ./pocs/poc_25 has a program header with invalid alignment /home/pt/sytseng/binutils-gdb-asan/binutils/objdump: option -P/--private not supported by this file AddressSanitizer:DEADLYSIGNAL ================================================================= ==2535506==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000002c (pc 0x55dca2fc8ff3 bp 0x7ffcc79f0d30 sp 0x7ffcc79f0b40 T0) ==2535506==The signal is caused by a READ memory access. ==2535506==Hint: address points to the zero page. #0 0x55dca2fc8ff2 in _bfd_elf_slurp_version_tables /home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9543 #1 0x55dca2f7f805 in bfd_elf64_slurp_symbol_table /home/pt/sytseng/binutils-gdb-asan/bfd/elfcode.h:1278 #2 0x55dca2fc722d in _bfd_elf_canonicalize_dynamic_symtab /home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9285 #3 0x55dca2db2e96 in slurp_dynamic_symtab objdump.c:1051 #4 0x55dca2dc93e0 in dump_bfd objdump.c:5656 #5 0x55dca2dc98cd in display_object_bfd objdump.c:5750 #6 0x55dca2dc9c05 in display_any_bfd objdump.c:5837 #7 0x55dca2dc9c7f in display_file objdump.c:5858 #8 0x55dca2dcb633 in main objdump.c:6269 #9 0x7fb063965082 in __libc_start_main ../csu/libc-start.c:308 #10 0x55dca2daf37d in _start (/home/pt/sytseng/binutils-gdb-asan/binutils/objdump+0x13737d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9543 in _bfd_elf_slurp_version_tables ==2535506==ABORTING -- You are receiving this mail because: You are on the CC list for the bug.