https://sourceware.org/bugzilla/show_bug.cgi?id=27794
Bug ID: 27794 Summary: [nm] heap-buffer-overflow in bfd.c:2389 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 13406 --> https://sourceware.org/bugzilla/attachment.cgi?id=13406&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: ==6874==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c000000240 at pc 0x00000057b4f4 bp 0x7ffffff fdaf0 sp 0x7fffffffd2b0 READ of size 2 at 0x60c000000240 thread T0 #0 0x57b4f3 in strchr (.../afl++/subjects_friend/nm/nm.san+0x57b4f3) #1 0xe31a8e in bfd_demangle .../subjects/binutils-gdb/bfd/bfd.c:2389:9 #2 0xe31775 in print_symname .../subjects/binutils-gdb/binutils/nm.c:456:15 #3 0xe7f607 in print_symbol .../subjects/binutils-gdb/binutils/nm.c:968:3 #4 0xe7ebe6 in print_symbols .../subjects/binutils-gdb/binutils/nm.c:1152:7 #5 0xe7ebe6 in display_rel_file .../subjects/binutils-gdb/binutils/nm.c:1279:5 #6 0xe7cdde in display_file .../subjects/binutils-gdb/binutils/nm.c:1446:7 #7 0xe7bfac 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 0x5661a9 in _start (.../afl++/subjects_friend/nm/nm.san+0x5661a9) 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.