https://sourceware.org/bugzilla/show_bug.cgi?id=28273
Bug ID: 28273 Summary: [strip] heap-use-after-free in 'group_signature' Product: binutils Version: 2.30 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: tricker51449 at gmail dot com Target Milestone: --- Created attachment 13626 --> https://sourceware.org/bugzilla/attachment.cgi?id=13626&action=edit crash file Hello, I detect the exception in strip via fuzzing testing. C compiler: clang-8.0 Configuration command: CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address" ./configure --disable-shared && make -j Execution command: strip -o <files> <input> The stack trace is shown below: ==70254==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000001e98 at pc 0x00000050efa7 bp 0x7ffc15c7dc20 sp 0x7ffc15c7dc18 READ of size 8 at 0x606000001e98 thread T0 #0 0x50efa6 in group_signature (/binutils-2.30-asan/bin/strip+0x50efa6) #1 0x50e2f9 in is_strip_section (/binutils-2.30-asan/bin/strip+0x50e2f9) #2 0x504ce7 in setup_section (/binutils-2.30-asan/bin/strip+0x504ce7) #3 0x5d62ae in bfd_map_over_sections (/binutils-2.30-asan/bin/strip+0x5d62ae) #4 0x500e58 in copy_object (/binutils-2.30-asan/bin/strip+0x500e58) #5 0x4fcbe1 in copy_file (/binutils-2.30-asan/bin/strip+0x4fcbe1) #6 0x4f759c in strip_main (/binutils-2.30-asan/bin/strip+0x4f759c) #7 0x4f6a3d in main (/binutils-2.30-asan/bin/strip+0x4f6a3d) #8 0x7f48208ecbf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310 #9 0x41b659 in _start (/binutils-2.30-asan/bin/strip+0x41b659) 0x606000001e98 is located 24 bytes inside of 49-byte region [0x606000001e80,0x606000001eb1) freed by thread T0 here: #0 0x4c6c82 in __interceptor_free (/binutils-2.30-asan/bin/strip+0x4c6c82) #1 0x7f482090018f in _nl_make_l10nflist /build/glibc-S9d2JN/glibc-2.27/intl/../intl/l10nflist.c:237 previously allocated by thread T0 here: #0 0x4c7003 in malloc (/binutils-2.30-asan/bin/strip+0x4c7003) #1 0x7f48208ffe10 in _nl_make_l10nflist /build/glibc-S9d2JN/glibc-2.27/intl/../intl/l10nflist.c:166 SUMMARY: AddressSanitizer: heap-use-after-free (/binutils-2.30-asan/bin/strip+0x50efa6) in group_signature Shadow bytes around the buggy address: 0x0c0c7fff8380: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fa 0x0c0c7fff8390: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa 0x0c0c7fff83a0: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd 0x0c0c7fff83b0: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fa 0x0c0c7fff83c0: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa =>0x0c0c7fff83d0: fd fd fd[fd]fd fd fd fa fa fa fa fa fa fa fa fa 0x0c0c7fff83e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff83f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8420: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==70254==ABORTING Thanks & Best Regards -- You are receiving this mail because: You are on the CC list for the bug.