]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
USE_MMAP fuzzed object file attacks
authorAlan Modra <amodra@gmail.com>
Wed, 3 Apr 2024 21:21:47 +0000 (07:51 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 4 Apr 2024 00:00:47 +0000 (10:30 +1030)
commitb86d3af60ffc5a821aa54404f57ffe9476919135
tree010ccc4bb1db97e6a77203a1725fa43fd03d6d7d
parent7e217ee2c06e6580386eccba812f767e20e61a00
USE_MMAP fuzzed object file attacks

If mmap is used without sanity checking, then we'll get a SIGBUS if
an access is done to the mmap'd memory corresponding to a page past
end of file.

* aoutx.h (aout_get_external_symbols): Check that mmap regions
are within file contents.  Catch stringsize overflow.
(some_aout_object_p): Don't clear already zeroed fields.  Tidy.
* pdp11.c: As for aoutx.h.  Copy some fixes too.
bfd/aoutx.h
bfd/pdp11.c