linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Linux-MM <linux-mm@kvack.org>,
	 LKML <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@surriel.com>,
	 Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	 Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	 Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH] mm: Prevent mapping slab pages to userspace
Date: Tue, 29 Jan 2019 08:00:14 +1300	[thread overview]
Message-ID: <CAGXu5jJkf4pKr0WVUcFitZnnUbq3annautZxzYPC0TQaB5HaGA@mail.gmail.com> (raw)
In-Reply-To: <20190128102055.5b0790549542891c4dca47a3@linux-foundation.org>

On Tue, Jan 29, 2019 at 7:21 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 25 Jan 2019 09:38:27 -0800 Matthew Wilcox <willy@infradead.org> wrote:
>
> > It's never appropriate to map a page allocated by SLAB into userspace.
> > A buggy device driver might try this, or an attacker might be able to
> > find a way to make it happen.
>
> It wouldn't surprise me if someone somewhere is doing this.  Rather
> than mysteriously breaking their code, how about we emit a warning and
> still permit it to proceed, for a while?

It seems like a fatal condition to me? There's nothing to check that
such a page wouldn't get freed by the slab while still mapped to
userspace, right?

But I'll take warning over not checking. :)

-- 
Kees Cook


  reply	other threads:[~2019-01-28 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 17:38 Matthew Wilcox
2019-01-25 18:44 ` Kees Cook
2019-01-25 18:44   ` Kees Cook
2019-01-25 19:30   ` Matthew Wilcox
2019-01-28 18:20 ` Andrew Morton
2019-01-28 19:00   ` Kees Cook [this message]
2019-01-28 20:08     ` Christopher Lameter
2019-01-31  0:37 ` Michael Ellerman
2019-01-31  6:03 ` Pekka Enberg

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=CAGXu5jJkf4pKr0WVUcFitZnnUbq3annautZxzYPC0TQaB5HaGA@mail.gmail.com \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpe@ellerman.id.au \
    --cc=penberg@kernel.org \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=willy@infradead.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