https://sourceware.org/bugzilla/show_bug.cgi?id=27800
Bug ID: 27800 Summary: [size] heap-buffer-overflow on bfd/archive.c:667 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 13412 --> https://sourceware.org/bugzilla/attachment.cgi?id=13412&action=edit crash test case Hello, I report a double free detected by address sanitizer. I found this test input by fuzz testing. The stack traces are as follows: ==19714==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60f0000002c7 at pc 0x0000004951ca bp 0x7fffffffe130 sp 0x7fffffffd8f8WRITE of size 112 at 0x60f0000002c7 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 0xd3d574 in _bfd_xcoff_openr_next_archived_file .../subjects/binutils-gdb/bfd/coff-rs6000.c:1763: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.