Linux Security Modules development
 help / color / mirror / Atom feed
From: jmorris@namei.org (James Morris)
To: linux-security-module@vger.kernel.org
Subject: [PATCH v2] exec: Set file unwritable before LSM check
Date: Mon, 19 Mar 2018 15:52:18 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LRH.2.21.1803191551580.5791@namei.org> (raw)
In-Reply-To: <20180309193020.GA5149@beast>

On Fri, 9 Mar 2018, Kees Cook wrote:

> The LSM check should happen after the file has been confirmed to be
> unchanging. Without this, we could have a race between the Time of Check
> (the call to security_kernel_read_file() which could read the file and
> make access policy decisions) and the Time of Use (starting with
> kernel_read_file()'s reading of the file contents). In theory, file
> contents could change between the two.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> v2: Clarify the ToC/ToU race (Linus)

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general
and next-testing


-- 
James Morris
<jmorris@namei.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2018-03-19  4:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 19:30 [PATCH v2] exec: Set file unwritable before LSM check Kees Cook
2018-03-09 19:47 ` Linus Torvalds
2018-03-09 19:54   ` Kees Cook
2018-03-09 21:54     ` Mimi Zohar
2018-03-13  5:16 ` James Morris
2018-03-19  4:52 ` 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.21.1803191551580.5791@namei.org \
    --to=jmorris@namei.org \
    --cc=linux-security-module@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