Re: [PATCH] Prefer kASLR over Hibernation

From: Kees Cook
Date: Wed Apr 06 2016 - 18:16:23 EST


On Wed, Apr 6, 2016 at 3:04 PM, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> On Wed, Apr 6, 2016 at 11:56 PM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>>
>> * Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>>
>>> On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>>> > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE,
>>> > one or the other must be chosen at boot-time. Until now, hibernation
>>> > was selected when no choice was made on the command line.
>>> >
>>> > To make the security benefits of kASLR more widely available to end
>>> > users (since the use of hibernation is becoming more rare and kASLR,
>>> > already available on x86, will be available on arm64 and MIPS soon),
>>> > this changes the default to preferring kASLR over hibernation. Users
>>> > wanting hibernation can turn off kASLR by adding "nokaslr" to the kernel
>>> > command line.
>>> >
>>> > Suggested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
>>> > Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
>>>
>>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>>>
>>> Or do you want me to apply it?
>>
>> I don't think this is a good idea, as it turns off emergency hibernation of
>> laptops - many desktop distros support it by default.
>
> Right, I forgot about this one.

When I last checked Ubuntu doesn't enable hibernation by default any more:
https://help.ubuntu.com/16.04/ubuntu-help/power-hibernate.html

And it seems like Fedora either doesn't either, or has a lot of people
for whom it doesn't work:
https://bugzilla.redhat.com/show_bug.cgi?id=1206936
https://bugzilla.redhat.com/show_bug.cgi?id=1224151
http://blog.kriptonium.com/2015/12/fedora-23-hibernate.html

-Kees

--
Kees Cook
Chrome OS & Brillo Security