Bug 29231 - objdump crashes on show_line:objdump.c:1958
Summary: objdump crashes on show_line:objdump.c:1958
Status: RESOLVED DUPLICATE of bug 29230
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.39
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2022-06-07 21:29 UTC by Shaohua Li
Modified: 2022-06-14 03:30 UTC (History)
0 users

See Also:
Last reconfirmed:

poc (5.26 KB, application/x-sharedlib)
2022-06-07 21:29 UTC, Shaohua Li

Note You need to log in before you can comment on or make changes to this bug.
Description Shaohua Li 2022-06-07 21:29:54 UTC
Created attachment 14136 [details]

On the given poc file, `objdump -S` crashes.

AddressSanitizer report:
==1668551==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000005f8 (pc 0x00000050a616 bp 0x7ffe4fa9ff70 sp 0x7ffe4fa9f980 T0)
==1668551==The signal is caused by a READ memory access.
==1668551==Hint: address points to the zero page.
    #0 0x50a616 in show_line //objdump/repo/binutils-asan/binutils/./objdump.c:1958:31
    #1 0x500f08 in disassemble_bytes //objdump/repo/binutils-asan/binutils/./objdump.c:3085:6
    #2 0x4f158e in disassemble_section //objdump/repo/binutils-asan/binutils/./objdump.c:3778:4
    #3 0x15298d5 in bfd_map_over_sections //objdump/repo/binutils-asan/bfd/section.c:1370:5
    #4 0x4dec21 in disassemble_data //objdump/repo/binutils-asan/binutils/./objdump.c:3922:3
    #5 0x4d76dd in dump_bfd //objdump/repo/binutils-asan/binutils/./objdump.c:5358:2
    #6 0x4d5a4f in display_object_bfd //objdump/repo/binutils-asan/binutils/./objdump.c:5421:7
    #7 0x4d594d in display_any_bfd //objdump/repo/binutils-asan/binutils/./objdump.c:5511:5
    #8 0x4d32cc in display_file //objdump/repo/binutils-asan/binutils/./objdump.c:5532:3
    #9 0x4d0d4c in main //objdump/repo/binutils-asan/binutils/./objdump.c:5924:6
    #10 0x7f333efed082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
    #11 0x41d5cd in _start (/objdump/repo/binutils-asan/binutils/objdump+0x41d5cd)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV //objdump/repo/binutils-asan/binutils/./objdump.c:1958:31 in show_line
Comment 1 Alan Modra 2022-06-14 03:30:22 UTC
Same underlying cause

*** This bug has been marked as a duplicate of bug 29230 ***