From: Ingo Molnar <mingo@kernel.org>
To: Julien Tinnes <jln@google.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, Jarkko Sakkinen <jarkko.sakkinen@intel.com>,
Matthew Garrett <mjg@redhat.com>,
Matt Fleming <matt.fleming@intel.com>,
Eric Northup <digitaleric@google.com>,
Dan Rosenberg <drosenberg@vsecurity.com>,
Will Drewry <wad@chromium.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 3/3] x86: kernel base offset ASLR
Date: Fri, 5 Apr 2013 09:05:30 +0200 [thread overview]
Message-ID: <20130405070530.GA26889@gmail.com> (raw)
In-Reply-To: <CAKyRK=gmUBaHvFtPyzEGN697gB1AhhcrguCWBGQvLZS7x-YFvQ@mail.gmail.com>
* Julien Tinnes <jln@google.com> wrote:
> On Thu, Apr 4, 2013 at 1:27 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> > On 04/04/2013 01:23 PM, Julien Tinnes wrote:
> >> On Thu, Apr 4, 2013 at 1:19 PM, Julien Tinnes <jln@google.com> wrote:
> >>> On Thu, Apr 4, 2013 at 1:12 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> >>>> On 04/04/2013 01:07 PM, Kees Cook wrote:
> >>>>> However, the benefits of
> >>>>> this feature in certain environments exceed the perceived weaknesses[2].
> >>>>
> >>>> Could you clarify?
> >>>
> >>> I think privilege reduction in general, and sandboxing in particular,
> >>> can make KASLR even more useful. A lot of the information leaks can be
> >>> mitigated in the same way as attack surface and vulnerabilities can be
> >>> mitigated.
> >>
> >> Case in point:
> >> - leaks of 64 bits kernel values to userland in compatibility
> >> sub-mode. Sandboxing by using seccomp-bpf can restrict a process to
> >> the 64-bit mode API.
> >> - restricting access to the syslog() system call
> >>
> >
> > That doesn't really speak to the value proposition. My concern is that
> > we're going to spend a lot of time chasing/plugging infoleaks instead of
> > tackling bigger problems.
>
> Certain leaks are already an issue, even without kernel base
> randomization.
Definitely. Stealth infiltration needs a high reliability expoit,
especially if the attack vector used is a zero day kernel vulnerability.
Injecting uncertainty gives us a chance to get a crash logged and the
vulnerability exposed.
> But yeah, this would give an incentive to plug more infoleaks. I'm not
> sure what cost this would incur on kernel development.
I consider it a plus on kernel development - the more incentives to plug
infoleaks, the better.
> There are by-design ones (printk) and bugs. I think we would want to
> correct bugs regardless?
Definitely.
> For by-design ones, privilege-reduction can often be an appropriate answer.
Correct, that's the motivation behind kptr_restrict and dmsg_restrict.
> I really see KASLR as the next natural step:
>
> 1. Enforce different privilege levels via the kernel
> 2. Attackers attack the kernel directly
> 3a. Allow user-land to restrict the kernel's attack surface and
> develop sandboxes (seccomp-bpf, kvm..)
> 3b. Add more exploitation defenses to the kernel, leveraging (3a) and (1).
>
> > 8 bits of entropy is not a lot.
>
> It would certainly be nice to have more, but it's a good first start.
> Unlike user-land segfaults, many kernel-mode panics aren't recoverable
> for an attacker.
The other aspect of even just a couple of bits of extra entropy is that it
changes the economics of worms and other remote attacks: there's a
significant difference between being able to infect one machine per packet
and only 1 out of 256 machines while the other 255 get crashed.
The downside is debuggability - so things like 'debug' on the kernel boot
command line should probably disable this feature automatically.
Thanks,
Ingo
next prev parent reply other threads:[~2013-04-05 7:05 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 20:07 [PATCH 0/3] kernel ASLR Kees Cook
2013-04-04 20:07 ` [PATCH 1/3] x86: routines to choose random kernel base offset Kees Cook
2013-04-05 7:24 ` Ingo Molnar
2013-04-05 7:36 ` Ingo Molnar
2013-04-05 18:15 ` H. Peter Anvin
2013-04-04 20:07 ` [PATCH 2/3] x86: build reloc tool for both 64 and 32 bit Kees Cook
2013-04-05 7:13 ` Ingo Molnar
2013-04-04 20:07 ` [PATCH 3/3] x86: kernel base offset ASLR Kees Cook
2013-04-04 20:12 ` H. Peter Anvin
2013-04-04 20:19 ` Julien Tinnes
2013-04-04 20:23 ` Julien Tinnes
2013-04-04 20:27 ` H. Peter Anvin
2013-04-04 20:48 ` Julien Tinnes
2013-04-05 7:05 ` Ingo Molnar [this message]
2013-04-04 20:54 ` Kees Cook
2013-04-04 20:58 ` H. Peter Anvin
2013-04-04 21:00 ` Kees Cook
2013-04-04 21:01 ` H. Peter Anvin
2013-04-04 21:04 ` Eric Northup
2013-04-04 21:06 ` Kees Cook
2013-04-04 21:00 ` Julien Tinnes
2013-04-04 21:01 ` Eric Northup
2013-04-05 7:55 ` Ingo Molnar
2013-04-04 20:21 ` H. Peter Anvin
2013-04-04 20:47 ` Eric Northup
2013-04-05 1:08 ` H. Peter Anvin
2013-04-05 8:04 ` Ingo Molnar
2013-04-05 15:30 ` H. Peter Anvin
2013-04-08 11:58 ` Ingo Molnar
2013-04-08 14:58 ` H. Peter Anvin
2013-04-05 18:17 ` H. Peter Anvin
2013-04-05 20:01 ` Yinghai Lu
2013-04-05 20:05 ` H. Peter Anvin
2013-04-05 20:19 ` Yinghai Lu
2013-04-05 20:29 ` H. Peter Anvin
2013-04-05 7:11 ` Ingo Molnar
2013-04-05 22:06 ` Julien Tinnes
2013-04-05 22:08 ` H. Peter Anvin
2013-04-05 22:13 ` Julien Tinnes
2013-04-05 7:34 ` Ingo Molnar
2013-04-05 12:12 ` Jiri Kosina
2013-04-05 14:49 ` Borislav Petkov
2013-04-05 20:19 ` Julien Tinnes
2013-04-05 20:43 ` Borislav Petkov
2013-04-05 23:18 ` Kees Cook
2013-04-06 10:10 ` Borislav Petkov
2013-04-08 12:13 ` Ingo Molnar
2013-04-11 20:52 ` [PATCH 0/3] kernel ASLR H. Peter Anvin
2013-04-11 21:28 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130405070530.GA26889@gmail.com \
--to=mingo@kernel.org \
--cc=digitaleric@google.com \
--cc=drosenberg@vsecurity.com \
--cc=hpa@zytor.com \
--cc=jarkko.sakkinen@intel.com \
--cc=jln@google.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=mjg@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=wad@chromium.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).