Date: Thu, 21 Jun 2018 15:39:03 +0200 From: Jann Horn <jannh@...gle.com> To: Kees Cook <keescook@...omium.org>, rick.p.edgecombe@...el.com Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>, "the arch/x86 maintainers" <x86@...nel.org>, kernel list <linux-kernel@...r.kernel.org>, Linux-MM <linux-mm@...ck.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, kristen.c.accardi@...el.com, Dave Hansen <dave.hansen@...el.com>, arjan.van.de.ven@...el.com Subject: Re: [PATCH 0/3] KASLR feature to randomize each loadable module On Thu, Jun 21, 2018 at 3:37 PM Jann Horn <jannh@...gle.com> wrote: > > On Thu, Jun 21, 2018 at 12:34 AM Kees Cook <keescook@...omium.org> wrote: > > > > On Wed, Jun 20, 2018 at 3:09 PM, Rick Edgecombe > > <rick.p.edgecombe@...el.com> wrote: > > > This patch changes the module loading KASLR algorithm to randomize the position > > > of each module text section allocation with at least 18 bits of entropy in the > > > typical case. It used on x86_64 only for now. > > > > Very cool! Thanks for sending the series. :) > > > > > Today the RANDOMIZE_BASE feature randomizes the base address where the module > > > allocations begin with 10 bits of entropy. From here, a highly deterministic > > > algorithm allocates space for the modules as they are loaded and un-loaded. If > > > an attacker can predict the order and identities for modules that will be > > > loaded, then a single text address leak can give the attacker access to the > > > > nit: "text address" -> "module text address" > > > > > So the defensive strength of this algorithm in typical usage (<800 modules) for > > > x86_64 should be at least 18 bits, even if an address from the random area > > > leaks. > > > > And most systems have <200 modules, really. I have 113 on a desktop > > right now, 63 on a server. So this looks like a trivial win. [...] > Also: What's the impact on memory usage? Is this going to increase the > number of pagetables that need to be allocated by the kernel per > module_alloc() by 4K or 8K or so? Sorry, I meant increase the amount of memory used by pagetables by 4K or 8K, not the number of pagetables.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.