lkml.org 
[lkml]   [2013]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] x86: routines to choose random kernel base offset

* Kees Cook <keescook@chromium.org> wrote:

> This provides routines for selecting a randomized kernel base offset,
> bounded by e820 details. It tries to use RDRAND and falls back to RDTSC.
> If "noaslr" is on the kernel command line, no offset will be used.

Would it make sense to also add three other sources of entropy:

---------

1)

CMOS_READ(RTC_SECONDS);

The exact second the bootup occured might not be known to the attacker, so
this could add a bit or two of entropy even in the worst case where the
attacker has access to precise 'uptime' and system log information and
there's no NTP active that fudges the offsets.

If the attacker is most restricted, in the sandboxed case, then this could
add a fair amount of entropy.

2)

Another source of per system entropy would be to simply mix all e820
entries into the random offset - we already parse them to place the kernel
image.

The e820 info changes per system type, amount of RAM and devices
installed.

Especially in a restricted remote environment the attacker might not know
the hardware details and the e820 map.

3)

A build time random bit. This is essentially per system as well if the
attacker does not know the precise kernel version, or if the kernel was
custom built.

---------

In the worst case an attacker can guess all of these bits - but
statistically it still improves entropy for the general Linux box that
gets attacked.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-04-05 10:01    [W:0.191 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site