asan: readelf buffer overflow and abort
authorAlan Modra <amodra@gmail.com>
Fri, 25 Sep 2020 00:35:57 +0000 (10:05 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 25 Sep 2020 02:25:01 +0000 (11:55 +0930)
commit5a805384b831e5946cc8dae13a75617cb4b9c080
tree52cc7d1c1aad1e515c72a29fee10302c3fdcb067
parentcc9ea2c21cd6e2c88995a7484d2c848c7d7ce71b
asan: readelf buffer overflow and abort

* elfcomm.c (byte_put_little_endian, byte_put_big_endian): Support
more field sizes.
* readelf.c (target_specific_reloc_handling <MSP430>): Limit
allowed reloc_size.  Don't read_leb128 outside of section.
binutils/ChangeLog
binutils/elfcomm.c
binutils/readelf.c