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:
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) launchpadlibrar ian.net/ 53144133/ readelf- crashes. patch
http://