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

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

> +config RANDOMIZE_BASE_MAX_OFFSET
> + hex "Maximum ASLR offset allowed"
> + depends on RANDOMIZE_BASE
> + default "0x10000000"
> + range 0x0 0x10000000
> + ---help---
> + Determines the maximal offset in bytes that will be applied to the
> + kernel when Address Space Layout Randomization (ASLR) is active.
> + Physical memory layout and kernel size may limit this further.
> + This must be a power of two.

I'm not sure this configuration option should be exposed. Is there any
reason that if the feature is enabled, to not set this to the highest
possible value?

Furthermore, when randomization is enabled, I'd suggest to default
kptr_restrict to 1 [if the user does not override it] - currently the
bootup default is 0.

I.e. make it easy to enable effective KASLR with a single configuration
step, without "forgot about kptr_restrict" gotchas.

I'd also suggest to rename RANDOMIZE_BASE to something like
RANDOMIZE_KBASE. The 'kbase' makes it really clear that this is about some
kernel base address randomization.

'Randomize base' sounds too generic, and could be misunderstood to mean
something about our random pool for example.

Thanks,

Ingo


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