From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3171941566161427576==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] libdwfl: Check relocations don't overlap ELF ehdr, shdrs or phdrs. Date: Thu, 04 Dec 2014 14:46:57 +0100 Message-ID: <1417700817.18974.18.camel@bordewijk.wildebeest.org> In-Reply-To: 20141130200213.GD26030@blokker.redhat.com --===============3171941566161427576== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --===============3171941566161427576==--