Re: [PATCH] binfmt_elf: Move brk for static PIE even if ASLR disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/05/2025 00:49, Kees Cook wrote:
> On Thu, May 01, 2025 at 12:03:32PM +0100, Ryan Roberts wrote:
>> I agree, as long as COMPAT_BRK is not set (which is the common case IFAICT).
>> When COMPAT_BRK is enabled, I think you are breaking the purpose of that
>> Kconfig? Perhaps it's not a real-world problem though...
> 
> When you turned off ASLR, what mechanism did you use? Personality or
> randomize_va_space=0?

randomize_va_space=0

> 
>>> It's possible it could break running the loader directly against some
>>> libc5-based binaries. If this turns out to be a real-world issue, we can
>>> find a better solution (perhaps pre-allocating a large brk).
>>
>> But how large is large enough...
> 
> Right -- Chrome has a 500MB brk on my laptop. :P Or with randomization
> off, it could allocate to the top of the mmap space just to keep
> "future" mmap allocations from landing in any holes...
> 
>> Perhaps it is safer to only move the brk if !IS_ENABLED(CONFIG_COMPAT_BRK) ?
>> Then wait to see if there are any real-world COMPAT_BRK users that hit the issue?
> 
> Yeah, that might be the best middle-ground.
> 





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux