mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Kees Cook <keescook@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: Re: [PATCH] doc: self-protection: provide initial details
Date: Mon, 23 May 2016 19:29:46 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1605231904400.10905@namei.org> (raw)
In-Reply-To: <20160517022728.GA2821@www.outflux.net>

On Mon, 16 May 2016, Kees Cook wrote:

> +#### Segregation of kernel memory from userspace memory
> +
> +The kernel must never execute userspace memory. The kernel must also never
> +access userspace memory without explicit expectation to do so. These
> +rules can be enforced either by support of hardware-based restrictions
> +(x86's SMEP/SMAP, ARM's PXN/PAN) or via emulation (ARM's Memory Domains).
> +By blocking userspace memory in this way, execution and data parsing
> +cannot be passed to trivially-controlled userspace memory, forcing
> +attacks to operate entirely in kernel memory.

One caveat is that there may be ways to bypass these protections, e.g. via 
aliased (direct mapped) memory.

I'd also note that some platforms have separate kernel and memory spaces, 
like Sparc.


> +To protect against even privileged users, systems may need to either
> +disable module loading entirely (e.g. monolithic kernel builds or
> +modules_disabled sysctl), or provide signed modules (e.g.
> +CONFIG_MODULE_SIG_FORCE, or dm-crypt with LoadPin), to keep from having
> +oot load arbitrary kernel code via the module loader interface.

Or utilize an appropriate MAC policy.



-- 
James Morris
<jmorris@namei.org>

      parent reply	other threads:[~2016-05-23  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17  2:27 Kees Cook
2016-05-17  2:37 ` [kernel-hardening] " Greg KH
2016-05-17 15:32 ` Randy Dunlap
2016-05-17 22:26 ` Jonathan Corbet
2016-05-18  1:44   ` Kees Cook
2016-05-23  9:29 ` James Morris [this message]

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=alpine.LRH.2.20.1605231904400.10905@namei.org \
    --to=jmorris@namei.org \
    --cc=corbet@lwn.net \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®