https://sourceware.org/bugzilla/show_bug.cgi?id=20929
Bug ID: 20929 Summary: STRIP crashes when closing the output bfd after copying Product: binutils Version: 2.28 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: boehme.marcel at gmail dot com Target Milestone: --- Dear all, The following bug was found with AFLFast, a fork of AFL, in a 24 hour fuzzing session on Binutils. Thanks also to Van-Thuan Pham. We would also like to thank Nick Clifton for addressing our reported bugs so promptly. Objcopy/Strip crashes with an invalid read of size 8 for the following execution on Ubuntu 16.04 x86_64 in Binutils trunk and for preinstalled version v2.26.1 and on Ubuntu 14.04 x86_64 for Binutils in trunk and preinstalled version v2.24. $ printf "\x08\x01\x000\x00\x00\x00\x00\x08\x00\x00\x000000\x00\x00\x00\x000000\x00\x00\x00\x00\x15\x00\x00\x00000000000000\x00\x00\x00\x080000000000000" > test $ strip -S test Segmentation fault ==140780== Invalid read of size 8 ==140780== at 0x6E5FF7: aout_32_swap_std_reloc_out (aoutx.h:1949) ==140780== by 0x6E5FF7: aout_32_squirt_out_relocs (aoutx.h:2422) ==140780== by 0x6D1D32: i386linux_write_object_contents (i386linux.c:77) ==140780== by 0x4F8A19: bfd_close (opncls.c:733) ==140780== by 0x42F6D7: copy_file (objcopy.c:2886) ==140780== by 0x416CEE: strip_main (objcopy.c:3790) ==140780== by 0x416CEE: main (objcopy.c:4890) ==140780== Address 0x0 is not stack'd, malloc'd or (recently) free'd Best regards, - Marcel -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils