https://sourceware.org/bugzilla/show_bug.cgi?id=22018
Bug ID: 22018 Summary: Heap out of bounds read in elf_i386_get_synthetic_symtab() Product: binutils Version: 2.29 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: fumfi.255 at gmail dot com Target Milestone: --- Created attachment 10374 --> https://sourceware.org/bugzilla/attachment.cgi?id=10374&action=edit POC to trigger heap out of bounds read (objdump) After some fuzz testing I found a crashing test case. Version: 2.29 Command: objdump -x -Wl -R -SD objdump_hoobr_elf_i386_get_synthetic_symtab ASAN Context: ==12394==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000f1 at pc 0x000000433332 bp 0x7ffda722aff0 sp 0x7ffda722a780 READ of size 2 at 0x6020000000f1 thread T0 #0 0x433331 in __interceptor_memcmp /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:690:7 #1 0x7d6af6 in elf_i386_get_synthetic_symtab XYZ/binutils-2.29/bfd/elf32-i386.c:6393:8 #2 0x4f2875 in dump_bfd XYZ/binutils-2.29/binutils/./objdump.c:3525:20 #3 0x4f0fc0 in display_any_bfd XYZ/binutils-2.29/binutils/./objdump.c #4 0x4f012a in display_file XYZ/binutils-2.29/binutils/./objdump.c:3713:3 #5 0x4f012a in main XYZ/binutils-2.29/binutils/./objdump.c:4015 #6 0x7fb6d9c3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #7 0x41a518 in _start (XYZ/binutils-2.29/binutils/objdump+0x41a518) 0x6020000000f1 is located 0 bytes to the right of 1-byte region [0x6020000000f0,0x6020000000f1) allocated by thread T0 here: #0 0x4c121c in malloc /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:66:3 #1 0x662bb3 in bfd_malloc XYZ/binutils-2.29/bfd/libbfd.c:193:9 #2 0x4f2875 in dump_bfd XYZ/binutils-2.29/binutils/./objdump.c:3525:20 #3 0x4f0fc0 in display_any_bfd XYZ/binutils-2.29/binutils/./objdump.c #4 0x4f012a in display_file XYZ/binutils-2.29/binutils/./objdump.c:3713:3 #5 0x4f012a in main XYZ/binutils-2.29/binutils/./objdump.c:4015 #6 0x7fb6d9c3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:690:7 in __interceptor_memcmp Shadow bytes around the buggy address: 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa fd fa fa fa 00 04 fa fa 00 04 fa fa 00 04 =>0x0c047fff8010: fa fa 00 01 fa fa 00 fa fa fa 00 fa fa fa[01]fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==12394==ABORTING -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils