[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/28419] New: global-buffer-overflow in objdump at objdump.c
From: |
irfanariq at kaist dot ac.kr |
Subject: |
[Bug binutils/28419] New: global-buffer-overflow in objdump at objdump.c:3054 |
Date: |
Tue, 05 Oct 2021 17:36:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28419
Bug ID: 28419
Summary: global-buffer-overflow in objdump at objdump.c:3054
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: irfanariq at kaist dot ac.kr
Target Milestone: ---
Created attachment 13702
--> https://sourceware.org/bugzilla/attachment.cgi?id=13702&action=edit
poc and full stack trace
Hello,
We are currently working on fuzz testing feature, and we found a
**global-buffer-overflow** on `objdump`.
The stack traces are as follow:
```st
==2709==ERROR: AddressSanitizer: global-buffer-overflow on address
0x5588a4712830 at pc 0x5588a22d7e13 bp 0x7fff1a598410 sp 0x7fff1a598400
READ of size 8 at 0x5588a4712830 thread T0
#0 0x5588a22d7e12 in disassemble_bytes objdump.c:3054
#1 0x5588a22da342 in disassemble_section objdump.c:3455
#2 0x5588a27a53c0 in bfd_map_over_sections
.../binutils-git/bfd/section.c:1383
#3 0x5588a22db293 in disassemble_data objdump.c:3599
#4 0x5588a22e26cc in dump_bfd objdump.c:5006
#5 0x5588a22e2994 in display_object_bfd objdump.c:5068
#6 0x5588a22e2d2f in display_any_bfd objdump.c:5158
#7 0x5588a22e2da6 in display_file objdump.c:5179
#8 0x5588a22e415a in main objdump.c:5529
```
The full stack trace is attached.
**Step to reproduce**
We configured `objdump` using `CFLAGS="-g -O0 -fsanitize=address" ./configure
--prefix=$(pwd)/ --disable-shared --enable-targets=all` and build it using
`make -j 10`, and run it with:
```
./objdump data16 -marm i8086 64 -Ttext --headers <attached file> ppcps
--debugging --wide --demangle 440 --dwarf --file-offsets --line-numbers
--disassemble nm -d -Wa
```
The input file is attached.
**Environment**
- OS: Ubuntu 18.04.5 LTS
- GCC version: gcc 7.5.0
- binutils version: commit (98ca73a) of master branch on sourceware git
([link](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=98ca73afe51e1e921915c37f242c88d4d445841c))
Thank you.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/28419] New: global-buffer-overflow in objdump at objdump.c:3054,
irfanariq at kaist dot ac.kr <=