[PATCH] readelf, libdw: Handle too many directories or files in the line table better.

Mark Wielaard mark@klomp.org
Sun Jun 10 15:21:00 GMT 2018


On Fri, Jun 08, 2018 at 04:06:29PM +0200, Mark Wielaard wrote:
> The afl fuzzer found that the way we handle "too many" directories or files
> in the (DWARF5 style) line table badly. In the case of eu-readelf we would
> print an endless stream of "bad directory" or "bad file". Just stop printing
> when the end of data is reached. In the case of dwarf_getsrclines we would
> allocate a giant amount of memory, even if there was no data to actually
> read in. Sanity check that the directory and file counts seem reasonable
> compared to the amount of data left (assume we need at least 1 byte of
> data per form describing the dirs or files).

Pushed to master.



More information about the Elfutils-devel mailing list