[PATCH] Avoid mapping past end of shared object (BZ #18685)

H.J. Lu hjl.tools@gmail.com
Fri Jul 17 03:40:00 GMT 2015


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.



More information about the Libc-alpha mailing list