[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22552] New: readelf - heap buffer overflow in load_debug_s
From: |
jonghyk.song at gmail dot com |
Subject: |
[Bug binutils/22552] New: readelf - heap buffer overflow in load_debug_section() |
Date: |
Wed, 06 Dec 2017 04:48:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22552
Bug ID: 22552
Summary: readelf - heap buffer overflow in load_debug_section()
Product: binutils
Version: 2.29
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: jonghyk.song at gmail dot com
Target Milestone: ---
Created attachment 10667
--> https://sourceware.org/bugzilla/attachment.cgi?id=10667&action=edit
crafted_elf_file
Dear all,
I found this bug with AFL fuzzer(2.52b).
My fuzzing environments are as follows:
1. $ uname -an
Linux jhsong-ubuntu 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44
UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
2. git commit: 8fbc617a46b015098876a7515c3a7ad6d1682876
3. build
CC="afl-gcc" CXX="afl-g++" CFLAGS="-fsanitize=address -ggdb -lpthread"
CXXFLAGS="-fsanitize=address -ggdb" LDFLAGS='-ldl' LIBS="-ldl" ./configure
To reproduce:
1. download the attached file
2. ./readelf -a [attached file]
Thank you.
==1204==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200000c3e0
at pc 0x0000004a59ed bp 0x7fffce243f00 sp 0x7fffce243ef0
READ of size 8 at 0x61200000c3e0 thread T0
#0 0x4a59ec in load_debug_section
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf.c:13588
#1 0x538a91 in load_separate_debug_file
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/dwarf.c:9839
#2 0x49c347 in process_object
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf.c:18580
#3 0x404c5c in process_file
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf.c:19004
#4 0x404c5c in main
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf.c:19063
#5 0x7f885963b82f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#6 0x405988 in _start
(/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf+0x405988)
AddressSanitizer can not describe address in more detail (wild memory access
suspected).
SUMMARY: AddressSanitizer: heap-buffer-overflow
/home/jhsong/fuzzing/binutils/binutils-gdb/binutils/readelf.c:13588
load_debug_section
Shadow bytes around the buggy address:
0x0c247fff9820: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff9830: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff9840: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff9850: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff9860: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c247fff9870: fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa
0x0c247fff9880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff9890: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff98a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff98b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff98c0: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==1204==ABORTING
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22552] New: readelf - heap buffer overflow in load_debug_section(),
jonghyk.song at gmail dot com <=