[PATCH] Avoid mapping past end of shared object (BZ #18685)
Siddhesh Poyarekar
siddhesh@redhat.com
Fri Jul 17 06:16:00 GMT 2015
On Fri, Jul 17, 2015 at 07:28:45AM +0200, Florian Weimer wrote:
> Can you show the ldd output with this patch applied on some files which
> crashed before? Is it useful at all?
I'll have to build one since I can't find any from a brief look
through files I have on my system. The examples were mostly the
.debug files IIRC, so that has more to do with not crashing than
actually providing any useful information.
> I know that debuginfo files usually have garbage interpreter fields, so
> I really doubt that ldd can produce anything useful on debuginfo files.
>
> + errstring = N_("ELF load command past end of file");
>
> The expectation appears to be that end users see this error message. It
> needs to better reflect what's going on.
OK, that makes sense.
> Is there a way that an ELF file is corrupted in this way, but can be
> still be loaded correctly? I wonder if this change will break currently
> working programs. I do think we need to support loading corrupted ELF
> files indefinitely if there ever was a binutils version producing them.
I don't know of any valid ELF programs that broke due to this. The
patch (AFAICT) has been in Fedora for about 3 years, so if something
had to break, it should have been known by now.
Siddhesh
More information about the Libc-alpha
mailing list