This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdwfl: Check relocations don't overlap ELF ehdr, shdrs or phdrs.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 04 Dec 2014 14:46:57 +0100
- Subject: Re: [PATCH] libdwfl: Check relocations don't overlap ELF ehdr, shdrs or phdrs.
On Sun, 2014-11-30 at 21:02 +0100, Mark Wielaard wrote:
> If either the section that needs the relocation applied, or the
> section that the relocations come from overlap one of the ehdrs, shdrs
> or phdrs data then refuse to do the relocations. We update both
> section data. It isn't illegal for ELF section data to overlap the
> header data, but updating the (relocation) data might corrupt the
> in-memory libelf headers causing strange corruptions or errors. Also
> check offset + size of a relocation doesn't overflow.
I pushed this to master now. This really fixed a lot of mysterious