Comment 8 for bug 614206

Revision history for this message
In , Dan Rosenberg (dan-j-rosenberg) wrote :

readelf crashes very easily when parsing malformed binaries. The attached patch
fixes three floating point exceptions (divide-by-zero) and approximately 13
out-of-bounds reads (due to null pointer dereference, integer overflows, and bad
array indexing). I have test files that trigger each of these crashes, but the
patch should be pretty self-explanatory. I've tested the patch, confirmed it
breaks no functionality, and that it resolves each of my crash files:

(Patch hosted on Ubuntu's Launchpad)
http://launchpadlibrarian.net/53144133/readelf-crashes.patch