asan: buffer overflow in elfnn-aarch64.c get_plt_type
authorAlan Modra <amodra@gmail.com>
Fri, 17 Dec 2021 01:49:54 +0000 (12:19 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 17 Dec 2021 05:31:13 +0000 (16:01 +1030)
commit8ef22662dcd18c6b069fee3b1a10557cb2c03af4
treee86d43f7ba09641f07fbc8778c3e517372eee9d8
parentdbc6a0e2e4bdc70133d9165fb2e15b592bc27c53
asan: buffer overflow in elfnn-aarch64.c get_plt_type

We can't assume .dynamic is a multiple of ElfNN_External_Dyn, at least
not when presented with fuzzed object files.

* elfnn-aarch64.c (get_plt_type): Don't access past end of
improperly sized .dynamic.
bfd/elfnn-aarch64.c