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] 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
crashers.

Cheers,

Mark

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