proc: protect mm start_code/end_code in /proc/pid/stat
From: Kees Cook <kees.cook@canonical.com>
While mm->start_stack was protected from cross-uid viewing (commit
f83ce3e6b02d5 ("proc: avoid information leaks to non-privileged
processes")), the start_code and end_code values were not. This would
allow the text location of a PIE binary to leak, defeating ASLR.
Note that the value "1" is used instead of "0" for a protected value since
"ps", "killall", and likely other readers of /proc/pid/stat, take
start_code of "0" to mean a kernel thread and will misbehave. Thanks to
Brad Spengler for pointing this out.
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
06-21-2011, 12:26 PM
Stefan Bader
proc: protect mm start_code/end_code in /proc/pid/stat
On 21.06.2011 11:35, Andy Whitcroft wrote:
> CVE-2011-0726
> ASLR leak in /proc/pid/stat for mm start_code
>
> This has hit Lucid and later via mainline/upstream stable. This needed
> for Hardy, Lucid/fsl-imx51, and Maverick/ti-omap4. Note that for Hardy
> an additional pre-requisite commit is required which also seems to fix
> a number of related ASLR leaks in the same file.
>
> Proposing for Hardy, Lucid/fsl-im51, and Maverick/ti-omap4.
>
> -apw
>
For other (non-Hardy) the patch looks reasonable and according to the descriptions.
Hardy (64bit) was tested running as dom0 and was behaving as expected. The
qa-regression tests passed and it was still possible to launch a domU.
Acked-by: Stefan Bader <stefan.bader@canonical.com>
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team