summaryrefslogtreecommitdiffstats
path: root/libelf/elf_getdata.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2016-10-26 13:08:52 +0200
committerMark Wielaard <[email protected]>2016-11-10 12:11:00 +0100
commit191000fdedba3fafe4d5b8cddad3f3318b49c3fb (patch)
treea5d69e218f1a4f183ac2e88299412b90c09d3c6c /libelf/elf_getdata.c
parentee38b26dc14f52eb8596e638776319ebc4213d36 (diff)
libelf: Always set ELF maxsize when reading an ELF file for sanity checks.
There are various sanity checks that depend on knowing the file size of the underlying ELF file which we only used when mmapping the ELF file. Although we probably won't crash if we use pread to try to read from the file, we still might return completely bogus data structures. This could cause us to malloc insane amounts of memory. Always try to get the maxsize when unknown in elf_begin.c (read_file). https://bugzilla.redhat.com/show_bug.cgi?id=1388057 Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libelf/elf_getdata.c')
0 files changed, 0 insertions, 0 deletions