[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21410] New: global-buffer-overflow in objcopy
From: |
dungnguy at comp dot nus.edu.sg |
Subject: |
[Bug binutils/21410] New: global-buffer-overflow in objcopy |
Date: |
Sat, 22 Apr 2017 04:39:50 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21410
Bug ID: 21410
Summary: global-buffer-overflow in objcopy
Product: binutils
Version: 2.28
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: dungnguy at comp dot nus.edu.sg
Target Milestone: ---
Created attachment 10007
--> https://sourceware.org/bugzilla/attachment.cgi?id=10007&action=edit
Bug triggering input
Dear All,
This bug was found with AFLGo, a directed version of AFL/AFLFast. Thanks also
to Marcel Böhme and Van-Thuan Pham.
This bug was found on Ubuntu 14.04 64-bit & binutils was checked out from main
repository at git://sourceware.org/git/binutils-gdb.git. Its commit is
a6c21d4a553de184562fd8409a5bcd3f2cc2561a (Wed Apr 19 13:16:05 2017).
binutils was built with ASAN using gcc-6.2 and clang-3.4. The configure command
was:
CC=clang CFLAGS="-DFORTIFY_SOURCE=2 -fstack-protector-all
-fsanitize=undefined,address -fno-omit-frame-pointer -g -Wno-error"
../configure --disable-shared --disable-gdb --disable-libdecnumber
--disable-readline --disable-sim
To reproduce:
Download the attached file - bug_8
objcopy --compress-debug-sections bug_8
ASAN says:
==148402==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000001a69aa5 at pc 0x00000044f150 bp 0x7ffec8592db0 sp 0x7ffec8592570
READ of size 1 at 0x000001a69aa5 thread T0
#0 0x44f14f in __interceptor_strcmp
(/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/objcopy+0x44f14f)
#1 0xb11a0a in _bfd_elf_get_reloc_section
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/elf.c:3568:10
#2 0xb3e092 in assign_section_numbers
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/elf.c:3844:8
#3 0xb15eb0 in _bfd_elf_compute_section_file_positions
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/elf.c:4184:8
#4 0xbad0f6 in _bfd_elf_set_section_contents
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/elf.c:8748:12
#5 0x86b5db in bfd_set_section_contents
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/section.c:1533:7
#6 0x5267e5 in copy_section
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/objcopy.c:3887:12
#7 0x869135 in bfd_map_over_sections
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/bfd/../../bfd/section.c:1395:5
#8 0x502117 in copy_object
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/objcopy.c:2858:3
#9 0x4ebe2c in copy_file
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/objcopy.c:3333:13
#10 0x4d6716 in copy_main
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/objcopy.c:5266:3
#11 0x4cac8a in main
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/objcopy.c:5367:5
#12 0x7fa14cf70f44 in __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
#13 0x4ca31c in _start
(/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/objcopy+0x4ca31c)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/21410] New: global-buffer-overflow in objcopy,
dungnguy at comp dot nus.edu.sg <=