Dear all, Using AFLFast (https://github.com/mboehme/aflfast), a fork of AFL, we found an input causing different programs (addr2line, strings and size) to abort due to an exception in peicode.h. The bug was found on Ubuntu 14.04 64-bit & binutils was checked out from https://github.com/bminor/binutils-gdb repository. Its commit is 268ebe95201d2ebdcf68cad9dc67ff6d1e25be9e (Fri Nov 18 14:15:12 2016). We also checked and confirmed the bug using the newest development version of binutils & binutils 2.24. To reproduce: printf "\x00\x00\xff\xff\x00\x00\x4c\x01\x30\x30\x30\x30\x24\x00\x00\x00\x00\x00\x01\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x00\x00\x30\x30\x30\x30\x30\x30\x30\x30" > fd addr2line -e fd OR size fd OR strings -d fd Error message: BFD (GNU Binutils) 2.27.51.20161128 internal error, aborting at ../../bfd/peicode.h:896 in pe_ILF_build_a_bfd Best regards, Thuan
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=52c4f3bdd5957a31b671a9791f462be5e8eadd85 commit 52c4f3bdd5957a31b671a9791f462be5e8eadd85 Author: Nick Clifton <nickc@redhat.com> Date: Mon Dec 5 14:59:02 2016 +0000 Fix abort when running tools on a bogus binary. PR binutils/20907 * peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
Hi Thuan, Thanks for reporting this problem. I have checked in a patch to replace the internal error with an error message, which also has the effect of removing the abort. Cheers Nick