bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/27798] New: [size] heap-buffer-overflow on bfd/coff-rs6000


From: dkcjd2000 at gmail dot com
Subject: [Bug binutils/27798] New: [size] heap-buffer-overflow on bfd/coff-rs6000.c:1699
Date: Thu, 29 Apr 2021 15:50:43 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27798

            Bug ID: 27798
           Summary: [size] heap-buffer-overflow on 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 13410
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13410&action=edit
crash test case

Hello,
I report a heap-buffer-overflow detected by address sanitizer.
I found this test input by fuzz testing.

The stack traces are as follows:
==22140==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x60f0000002c5 at pc 0x0000004951ca bp 0x7fffffffe1d0 sp 0x7fffffffd998WRITE of
size 112 at 0x60f0000002c5 thread T0'
    #0 0x4951c9 in __asan_memcpy (.../subjects_asan/size/size.san+0x4951c9)'
    #1 0xd3c7cb in _bfd_xcoff_read_ar_hdr
.../subjects/binutils-gdb/bfd/coff-rs6000.c:1699:7'
    #2 0x4cf476 in _bfd_get_elt_at_filepos
.../subjects/binutils-gdb/bfd/archive.c:667:44'
    #3 0x8cf947 in xcoff64_openr_next_archived_file
.../subjects/binutils-gdb/bfd/coff64-rs6000.c:1933:10'
    #4 0x4d0543 in bfd_openr_next_archived_file
.../subjects/binutils-gdb/bfd/archive.c:811:10'
    #5 0x4c6a5f in display_archive
.../subjects/binutils-gdb/binutils/size.c:381:16'
    #6 0x4c6816 in display_file
.../subjects/binutils-gdb/binutils/size.c:430:5'
    #7 0x4c6412 in main .../subjects/binutils-gdb/binutils/size.c:258:7'
    #8 0x7ffff6e22bf6 in __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310'
    #9 0x41be59 in _start (.../subjects_asan/size/size.san+0x41be59)'

You can reproduce the bug by executing
./size <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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]