exec-randomization: brk away from exec rand area
authorKees Cook <kees.cook@canonical.com>
Fri, 5 Nov 2010 18:59:32 +0000 (11:59 -0700)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:50:19 +0000 (06:50 -0700)
commited8a31a05b41a4975abd833a07018ca81ae2af84
tree958cbde0cccd172b7b0daef0564e0b69dbf04298
parent4a52f7d4e6820384b8b69e885961ca2b02f60245
exec-randomization: brk away from exec rand area

This is a fix for the NX emulation patch to force the brk area well
outside of the exec randomization area to avoid future allocation or brk
growth collisions. Normally this isn't a problem, except when the text
region has been loaded from a PIE binary and the CS limit can't be put
just above bss.

A test-case that will show failures without this patch can be found here:
http://bazaar.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master/annotate/head%3A/scripts/kernel-aslr-collisions/explode-brk.c

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
arch/x86/kernel/process.c