Searched hist:"1868 eb206733e931b6c6c2d85d55e646bc8a2496" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/ldelf/ |
| H A D | ta_elf_rel.c | 1868eb206733e931b6c6c2d85d55e646bc8a2496 Wed Oct 16 08:44:26 UTC 2024 Gyorgy Szing <gyorgy.szing@arm.com> ldelf: fix crash when hash-style is sysv
This issue afects binaryes using the sysv style hash table (-WL,hash-style=sysv)
When the "nbuckets" filed in the hash table (.hash) is set to 0, ldelf will do out-of-bounds indexing and crash with a data abort. Such a hash table is strange but GCC 13.3.0 seems to produce them in some cases anyway.
This fix returns an error is nbuckets is 0 before using the value, and makes an affected S-EL0 SP binary load fine.
Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
|