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: "Carlos O'Donell" <carlos at redhat dot com>
- To: pinskia at gmail dot com
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "roland at hack dot frob dot com" <roland at hack dot frob dot com>
- Date: Fri, 17 Jul 2015 08:51:28 -0400
- 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> <55A7D4D6 dot 9030407 at redhat dot com> <20150717032846 dot GA19592 at spoyarek dot pnq dot redhat dot com> <55A87E63 dot 5030506 at redhat dot com> <812DDAF4-A7F6-47B2-BFF0-165FC2A79753 at gmail dot com>
On 07/17/2015 08:00 AM, email@example.com wrote:
>> Is this really a bug?
>> The cost of the checks is more than just performance, but also maintenance
>> and support of that code into the future. It is about testing that code,
>> making sure we exercise those weird conditional failure paths which we
>> thought would be a good thing to add. Each of these checks is an additional
>> complication, added branch, and conditional in already complicated code.
>> I would like to see the core loader as simple as possible and to expect
>> as correct as possible input.
> Yes but the cost is cheaper than someone accidentally doing a dlopen
> of a file and causing a crash rather than retuning malformed elf
> file. I suspect that is a way how to reproduce this failure.
Sorry, could you please clarify: Cheaper for the glibc community or
cheaper for the user? Could you clarify what you mean by "returning
malformed elf file?"