[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30642] New: AddressSanitizer: heap-buffer-overflow /home/r
From: |
sihan2021 at iscas dot ac.cn |
Subject: |
[Bug binutils/30642] New: AddressSanitizer: heap-buffer-overflow /home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libbfd.c:784:8 in bfd_getl64 |
Date: |
Sat, 15 Jul 2023 07:43:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30642
Bug ID: 30642
Summary: AddressSanitizer: heap-buffer-overflow
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libb
fd.c:784:8 in bfd_getl64
Product: binutils
Version: 2.39
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: sihan2021 at iscas dot ac.cn
Target Milestone: ---
Created attachment 14973
--> https://sourceware.org/bugzilla/attachment.cgi?id=14973&action=edit
crash seed
Hello Binutils developers,
We recently conducted a fuzzing test on objdump and discovered a
heap-buffer-overflow bug. We would like to provide a detailed description of
the bug and seek your assistance in addressing it.
version:
objdump: 2.39
gcc:gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
ubuntu: 20.04
command to reproduce:
objdump -r hbo_1
hbo_1 is attached to this report.
ASAN report:
=================================================================
==2663251==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x6030000001af at pc 0x0000007766c5 bp 0x7ffe098c1300 sp 0x7ffe098c12f8
READ of size 1 at 0x6030000001af thread T0
#0 0x7766c4 in bfd_getl64
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libbfd.c:784:8
#1 0x842b3d in bfd_elf64_swap_reloc_in
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./elfcode.h:421:17
#2 0x853f92 in elf_slurp_reloc_table_from_section
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./elfcode.h:1499:2
#3 0x85365e in bfd_elf64_slurp_reloc_table
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./elfcode.h:1616:11
#4 0x8b48f4 in _bfd_elf_canonicalize_reloc
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/elf.c:8687:9
#5 0x749113 in bfd_canonicalize_reloc
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/bfd.c:1579:10
#6 0x4e2c97 in dump_relocs_in_section
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5087:18
#7 0x78674f in bfd_map_over_sections
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/section.c:1370:5
#8 0x4db403 in dump_relocs
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5111:3
#9 0x4d67dd in dump_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5352:2
#10 0x4d487d in display_object_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5421:7
#11 0x4d4711 in display_any_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5507:5
#12 0x4d2af3 in display_file
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5528:3
#13 0x4d0942 in main
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5920:6
#14 0x7f5589c29082 in __libc_start_main
/build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#15 0x41d60d in _start
(/home/root/sp/Fuzz/aflpp_fuzz/Binutils/document_group/stop-address_r/objdump_4/objdump+0x41d60d)
0x6030000001af is located 7 bytes to the right of 24-byte region
[0x603000000190,0x6030000001a8)
allocated by thread T0 here:
#0 0x499dbd in __interceptor_malloc
(/home/root/sp/Fuzz/aflpp_fuzz/Binutils/document_group/stop-address_r/objdump_4/objdump+0x499dbd)
#1 0x774907 in bfd_malloc
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libbfd.c:289:9
#2 0x85289a in _bfd_malloc_and_read
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./libbfd.h:955:9
#3 0x853c84 in elf_slurp_reloc_table_from_section
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./elfcode.h:1474:15
#4 0x85365e in bfd_elf64_slurp_reloc_table
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/./elfcode.h:1616:11
#5 0x8b48f4 in _bfd_elf_canonicalize_reloc
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/elf.c:8687:9
#6 0x749113 in bfd_canonicalize_reloc
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/bfd.c:1579:10
#7 0x4e2c97 in dump_relocs_in_section
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5087:18
#8 0x78674f in bfd_map_over_sections
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/section.c:1370:5
#9 0x4db403 in dump_relocs
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5111:3
#10 0x4d67dd in dump_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5352:2
#11 0x4d487d in display_object_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5421:7
#12 0x4d4711 in display_any_bfd
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5507:5
#13 0x4d2af3 in display_file
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5528:3
#14 0x4d0942 in main
/home/root/sp/Dataset/Binutils/binutils_aflpp/binutils/./objdump.c:5920:6
#15 0x7f5589c29082 in __libc_start_main
/build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow
/home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libbfd.c:784:8 in bfd_getl64
Shadow bytes around the buggy address:
0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff8000: fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa fd fd
0x0c067fff8010: fd fa fa fa fd fd fd fa fa fa 00 00 00 fa fa fa
0x0c067fff8020: fd fd fd fd fa fa fd fd fd fa fa fa 00 00 00 00
=>0x0c067fff8030: fa fa 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa
0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8080: 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
==2663251==ABORTING
Thank you for your attention and support.
Best regards,
Michael Zhang.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/30642] New: AddressSanitizer: heap-buffer-overflow /home/root/sp/Dataset/Binutils/binutils_aflpp/bfd/libbfd.c:784:8 in bfd_getl64,
sihan2021 at iscas dot ac.cn <=