Re: [RFC][PATCH] Randomize kernel base address on boot

From: Ingo Molnar
Date: Fri May 27 2011 - 13:47:03 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Fri, May 27, 2011 at 10:16 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
> >
> > Well, 'fixing the info leaks' will obfuscate previously useful files
> > such as /proc/kallsyms ...
>
> Guys, stop with the crazy already.
>
> YOU HAVE TO DO THAT FOR THE LINK-TIME-OBFUSCATION TOO!
>
> > That's one of the advantages of randomization: it allows us to
> > expose RIPs without them being an instant information leak.
>
> Except you clearly aren't thinking that through AT ALL.
>
> The obfuscation of things like /proc/kallsyms is *exactly*the*same*
> whether you do the randomization at boot-time or install-time.

Well, but two mails ago you said:

> And load-time randomization has all these nasty problems with
> memory maps etc, because we obviously have to shift the whole
> kernel around by some fixed offset. But if there was some way to
> just re-link the distro kernel easily, then it could be done by the
> kernel install scripts, and it could potentially do more than just
> "shift up load address by some random number".

If i understood you correctly you suggest randomizing the image by
shifting the symbols in it around. The boot loader would still load
an 'image' where it always loads it - just that image itself is
randomized internally somewhat, right?

( because that's the only way we can avoid the problems with e820
memory maps which you referred to, if don't actually change the
load address. )

Have i understood you correctly?

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/