Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 3 Feb 2017 01:13:06 +0530
From: Bhupesh Sharma <bhsharma@...hat.com>
To: Kees Cook <keescook@...omium.org>
Cc: Matt Porter <mporter@...nel.crashing.org>, Paul Mackerras <paulus@...ba.org>, 
	Daniel Cashman <dcashman@...roid.com>, Bhupesh SHARMA <bhupesh.linux@...il.com>, 
	Alexander Graf <agraf@...e.com>, 
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>, Scott Wood <oss@...error.net>, 
	Michael Ellerman <mpe@...erman.id.au>, Anatolij Gustschin <agust@...x.de>, 
	Benjamin Herrenschmidt <benh@...nel.crashing.org>, Vitaly Bordug <vitb@...nel.crashing.org>, 
	Kumar Gala <galak@...nel.crashing.org>, Alistair Popple <alistair@...ple.id.au>, 
	Daniel Cashman <dcashman@...gle.com>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>
Subject: Re: [PATCH 0/2] RFC: Adjust powerpc ASLR elf randomness

On 3 Feb 2017 00:49, "Kees Cook" <keescook@...omium.org> wrote:

On Thu, Feb 2, 2017 at 10:08 AM, Bhupesh Sharma <bhsharma@...hat.com> wrote:
> On Thu, Feb 2, 2017 at 7:51 PM, Kees Cook <keescook@...omium.org> wrote:
>> On Wed, Feb 1, 2017 at 9:42 PM, Bhupesh Sharma <bhsharma@...hat.com>
wrote:
>>> The 2nd patch increases the ELF_ET_DYN_BASE value from the current
>>> hardcoded value of 0x2000_0000 to something more practical,
>>> i.e. TASK_SIZE - PAGE_SHIFT (which makes sense especially for
>>> 64-bit platforms which would like to utilize more randomization
>>> in the load address of a PIE elf).
>>
>> I don't think you want this second patch. Moving ELF_ET_DYN_BASE to
>> the top of TASK_SIZE means you'll be constantly colliding with stack
>> and mmap randomization. 0x20000000 is way better since it randomizes
>> up from there towards the mmap area.
>>
>> Is there a reason to avoid the 32-bit memory range for the ELF addresses?
>
> I think you are right. Hmm, I think I was going by my particular use
> case which might not be required for generic PPC platforms.
>
> I have one doubt though - I have primarily worked on arm64 and x86
> architectures and there I see there 64-bit user space applications
> using the 64-bit load addresses/ranges. I am not sure why PPC64 is
> different historically.

x86's ELF_ET_DYN_BASE is (TASK_SIZE / 3 * 2), so it puts it ET_DYN
base at the top third of the address space. (In theory, this is to
avoid interpreter collisions, but I'm working on removing that
restriction, as it seems pointless.)

Other architectures have small ELF_ET_DYN_BASEs, which is good: it
allows them to have larger entropy for ET_DYN.


Fair enough. I will drop the 2nd patch then and spin a v2.

Regards,
Bhupesh

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.