This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Avoid mapping past end of shared object (BZ #18685)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>
- Date: Thu, 16 Jul 2015 20:40:19 -0700
- 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> <CAMe9rOqX6FH9z4F_xnfikV72aUAsGFiiVcOLJ-7zed=nMrQbsQ at mail dot gmail dot com> <20150717033344 dot GB19592 at spoyarek dot pnq dot redhat dot com>
On Thu, Jul 16, 2015 at 8:33 PM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> On Thu, Jul 16, 2015 at 08:15:17PM -0700, H.J. Lu wrote:
>> If I understand it correctly, ld.so crashes on an ELF file with segment headers
>> where file offset is larger than the file itself. Isn't it the same
>> as a corrupted
>> ELF file with segment headers where file offset is larger than the file itself?
>> I can create such a file with a binary editor.
>
> Yes, which is the point of including such fixes IMO.
>
You can create such a testcase with a simple program which updates
the segment header in a good ELF file.
--
H.J.