This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Avoid mapping past end of shared object (BZ #18685)
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org, roland at hack dot frob dot com
- Date: Fri, 17 Jul 2015 11:45:58 +0530
- Subject: Re: [PATCH] Avoid mapping past end of shared object (BZ #18685)
- Authentication-results: sourceware.org; auth=none
- References: <1437033625-13561-1-git-send-email-siddhesh at redhat dot com> <55A8928D dot 2090409 at redhat dot com>
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.