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