bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28304] New: objdump crashes in bfd_get_symcount


From: shaohua.li at inf dot ethz.ch
Subject: [Bug binutils/28304] New: objdump crashes in bfd_get_symcount
Date: Fri, 03 Sep 2021 14:49:48 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28304

            Bug ID: 28304
           Summary: objdump crashes in bfd_get_symcount
           Product: binutils
           Version: 2.38 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: shaohua.li at inf dot ethz.ch
  Target Milestone: ---

Created attachment 13648
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13648&action=edit
poc

Hi there,

I crashed `objdump -S` with a fuzzer.

- Compiler: clang12
- Platform: Ubuntu 18.04.5 LTS, x86_64
- Reproduce: run `objdump -S poc`

AddressSanitizer report:

==2797==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000c8 (pc
0x000000f07bf3 bp 0x7ffc74b438d0 sp 0x7ffc74b438b0 T0)
==2797==The signal is caused by a READ memory access.
==2797==Hint: address points to the zero page.
    #0 0xf07bf3 in bfd_get_symcount /binutils_latest/repo/bfd/./bfd.h:6847:16
    #1 0xf07925 in score_elf_assign_gp
/binutils_latest/repo/bfd/elf32-score7.c:265:11
    #2 0xf07256 in score_elf_final_gp
/binutils_latest/repo/bfd/elf32-score7.c:330:17
    #3 0xf064a9 in score_elf_gprel15_reloc
/binutils_latest/repo/bfd/elf32-score7.c:446:9
    #4 0x1b4bae7 in bfd_perform_relocation
/binutils_latest/repo/bfd/reloc.c:711:14
    #5 0x1b4fa9f in bfd_generic_get_relocated_section_contents
/binutils_latest/repo/bfd/reloc.c:8463:10
    #6 0xae85cf in bfd_get_relocated_section_contents
/binutils_latest/repo/bfd/bfd.c:2166:10
    #7 0xb11ef8 in bfd_simple_get_relocated_section_contents
/binutils_latest/repo/bfd/simple.c:298:14
    #8 0xcaddac in read_section /binutils_latest/repo/bfd/./dwarf2.c:582:7
    #9 0xcaaa47 in _bfd_dwarf2_slurp_debug_info
/binutils_latest/repo/bfd/./dwarf2.c:4737:13
    #10 0xcaefd1 in _bfd_dwarf2_find_nearest_line
/binutils_latest/repo/bfd/./dwarf2.c:4985:9
    #11 0xbd33e9 in _bfd_elf_find_nearest_line
/binutils_latest/repo/bfd/elf.c:9192:7
    #12 0x4e49ea in show_line /binutils_latest/repo/binutils/./objdump.c:1784:9
    #13 0x4e0b9f in disassemble_bytes
/binutils_latest/repo/binutils/./objdump.c:2770:6
    #14 0x4daf10 in disassemble_section
/binutils_latest/repo/binutils/./objdump.c:3455:4
    #15 0xb100da in bfd_map_over_sections
/binutils_latest/repo/bfd/section.c:1383:5
    #16 0x4d1ae0 in disassemble_data
/binutils_latest/repo/binutils/./objdump.c:3599:3
    #17 0x4cda84 in dump_bfd /binutils_latest/repo/binutils/./objdump.c:5006:5
    #18 0x4ccb9f in display_object_bfd
/binutils_latest/repo/binutils/./objdump.c:5068:7
    #19 0x4ccaa9 in display_any_bfd
/binutils_latest/repo/binutils/./objdump.c:5158:5
    #20 0x4cc65c in display_file
/binutils_latest/repo/binutils/./objdump.c:5179:3
    #21 0x4cb063 in main /binutils_latest/repo/binutils/./objdump.c:5529:6
    #22 0x7fc60e97f0b2 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #23 0x41c61d in _start (/out_bin/objdump+0x41c61d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /binutils_latest/repo/bfd/./bfd.h:6847:16 in
bfd_get_symcount
==2797==ABORTING

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]