asan: readelf: wild read in get_num_dynamic_syms
* readelf.c (get_num_dynamic_syms): Bounds check mipsxlat array access.
This commit is contained in:
parent
1484644d35
commit
c31ab5a001
@ -1,3 +1,8 @@
|
||||
2020-05-21 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* readelf.c (get_num_dynamic_syms): Bounds check mipsxlat array
|
||||
access.
|
||||
|
||||
2020-05-20 Nelson Chu <nelson.chu@sifive.com>
|
||||
|
||||
* dwarf.c: Updated since DECLARE_CSR is changed.
|
||||
|
@ -10211,7 +10211,8 @@ get_num_dynamic_syms (Filedata * filedata)
|
||||
{
|
||||
if (filedata->dynamic_info_DT_MIPS_XHASH)
|
||||
{
|
||||
if (filedata->mipsxlat[off] >= num_of_syms)
|
||||
if (off < filedata->ngnuchains
|
||||
&& filedata->mipsxlat[off] >= num_of_syms)
|
||||
num_of_syms = filedata->mipsxlat[off] + 1;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user