[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/27795] New: [nm] heap-buffer-overflow in bfd/coff-rs6000.c
From: |
dkcjd2000 at gmail dot com |
Subject: |
[Bug binutils/27795] New: [nm] heap-buffer-overflow in bfd/coff-rs6000.c:1699 |
Date: |
Thu, 29 Apr 2021 15:29:44 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27795
Bug ID: 27795
Summary: [nm] heap-buffer-overflow in bfd/coff-rs6000.c:1699
Product: binutils
Version: 2.37 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: dkcjd2000 at gmail dot com
Target Milestone: ---
Created attachment 13407
--> https://sourceware.org/bugzilla/attachment.cgi?id=13407&action=edit
crash test case
Hello,
I report a heap buffer overflow detected by address sanitizer.
I found this test input by a fuzz testing.
The stack traces is as follows:
==20505==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x60f0000002c7 at pc 0x00000049521a bp 0x7fffffffdf30 sp 0x7fffffffd6f8WRITE of
size 112 at 0x60f0000002c7 thread T0'
#0 0x495219 in __asan_memcpy (.../subjects_asan/nm/nm.san+0x495219)'
#1 0xd4ba3b in _bfd_xcoff_read_ar_hdr
.../subjects/binutils-gdb/bfd/coff-rs6000.c:1699:7'
#2 0x4d7726 in _bfd_get_elt_at_filepos
.../subjects/binutils-gdb/bfd/archive.c:667:44'
#3 0xd4c7e4 in _bfd_xcoff_openr_next_archived_file
.../subjects/binutils-gdb/bfd/coff-rs6000.c:1763:10'
#4 0x4d87f3 in bfd_openr_next_archived_file
.../subjects/binutils-gdb/bfd/archive.c:811:10'
#5 0x4c96fb in display_archive
.../subjects/binutils-gdb/binutils/nm.c:1372:16'
#6 0x4c6bf2 in display_file .../subjects/binutils-gdb/binutils/nm.c:1440:7'
#7 0x4c656c in main .../subjects/binutils-gdb/binutils/nm.c:1965:12'
#8 0x7ffff6e22bf6 in __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310'
#9 0x41bea9 in _start (.../subjects_asan/nm/nm.san+0x41bea9)'
You can reproduce the bug by executing
./nm -C <test input>
I tested the subject on the latest version uploaded on git,
build with --disable-shared --disable-gdb --disable-libdecnumber --disable-ld
--enable-targets=all
configure options.
Thanks
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/27795] New: [nm] heap-buffer-overflow in bfd/coff-rs6000.c:1699,
dkcjd2000 at gmail dot com <=