mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
Catch potential integer overflow in readelf when processing corrupt binaries.
PR 24829 * readelf.c (apply_relocations): Catch potential integer overflow whilst checking reloc location against section size.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2019-08-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 24829
|
||||||
|
* readelf.c (apply_relocations): Catch potential integer overflow
|
||||||
|
whilst checking reloc location against section size.
|
||||||
|
|
||||||
2019-08-02 Alan Modra <amodra@gmail.com>
|
2019-08-02 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 24871
|
PR 24871
|
||||||
|
@ -13366,7 +13366,7 @@ apply_relocations (Filedata * filedata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
rloc = start + rp->r_offset;
|
rloc = start + rp->r_offset;
|
||||||
if ((rloc + reloc_size) > end || (rloc < start))
|
if (rloc >= end || (rloc + reloc_size) > end || (rloc < start))
|
||||||
{
|
{
|
||||||
warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
|
warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
|
||||||
(unsigned long) rp->r_offset,
|
(unsigned long) rp->r_offset,
|
||||||
|
Reference in New Issue
Block a user