This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libelf: Always set ELF maxsize when reading an ELF file for sanity checks.


On Wed, 2016-10-26 at 13:17 +0200, Mark Wielaard wrote:
> 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

Again I didn't hear back from the original reporter whether this
really solved their problem. But the change does look correct and
desirable. So I have pushed this to master now.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]