All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Schmid, Carsten" <Carsten_Schmid@mentor.com>
Cc: "sashal@kernel.org" <sashal@kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH Backport to stable/linux-4.14.y] make 'user_access_begin()' do 'access_ok()'
Date: Wed, 1 Apr 2020 11:32:35 +0200	[thread overview]
Message-ID: <20200401093235.GB2055942@kroah.com> (raw)
In-Reply-To: <1585733082992.99012@mentor.com>

On Wed, Apr 01, 2020 at 09:24:43AM +0000, Schmid, Carsten wrote:
> >From eb5a13ddc30824c20f1e2b662d2c821ad3808526 Mon Sep 17 00:00:00 2001
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Fri, 4 Jan 2019 12:56:09 -0800
> Subject: [PATCH] make 'user_access_begin()' do 'access_ok()'
> 
> [ Upstream commit 594cc251fdd0d231d342d88b2fdff4bc42fb0690 ]
> 
> Fixes CVE-2018-20669
> Backported from v5.0-rc1
> Patch 1/1

Also, that cve was "supposed" to already be fixed in the 4.19.13 kernel
release for some reason, and it's a drm issue, not a core access_ok()
issue.

So why is this needed for 4.14?

> 
> Originally, the rule used to be that you'd have to do access_ok()
> separately, and then user_access_begin() before actually doing the
> direct (optimized) user access.
> 
> But experience has shown that people then decide not to do access_ok()
> at all, and instead rely on it being implied by other operations or
> similar.  Which makes it very hard to verify that the access has
> actually been range-checked.
> 
> If you use the unsafe direct user accesses, hardware features (either
> SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged
> Access Never - on ARM) do force you to use user_access_begin().  But
> nothing really forces the range check.
> 
> By putting the range check into user_access_begin(), we actually force
> people to do the right thing (tm), and the range check vill be visible
> near the actual accesses.  We have way too long a history of people
> trying to avoid them.
> 
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No s-o-by from you?

> ---
> Rationale:
> When working on stability and security for a project with 4.14 kernel,
> i backported patches from upstream.
> Want to give this work back to the community, as 4.14 is a SLTS.

What is "SLTS"?

thanks,

greg k-h

  parent reply	other threads:[~2020-04-01  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  8:49 [PATCH Backport to stable/linux-4.14.y] make 'user_access_begin()' do 'access_ok()' Schmid, Carsten
2020-04-01  9:24 ` Schmid, Carsten
2020-04-01  9:29   ` Greg KH
2020-04-01  9:32   ` Greg KH [this message]
     [not found]     ` <1585735684794.48644@mentor.com>
2020-04-01 10:32       ` AW: " Schmid, Carsten
2020-04-01 11:01         ` Greg KH

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=20200401093235.GB2055942@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Carsten_Schmid@mentor.com \
    --cc=sashal@kernel.org \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.