linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Jann Horn <jannh@google.com>
Cc: Kees Cook <keescook@chromium.org>,
	Tycho Andersen <tycho@tycho.pizza>,
	Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH resend] seccomp: Make duplicate listener detection non-racy
Date: Mon,  5 Oct 2020 15:30:54 -0700	[thread overview]
Message-ID: <160193704489.2698420.14892403272288554518.b4-ty@chromium.org> (raw)
In-Reply-To: <20201005014401.490175-1-jannh@google.com>

On Mon, 5 Oct 2020 03:44:01 +0200, Jann Horn wrote:
> Currently, init_listener() tries to prevent adding a filter with
> SECCOMP_FILTER_FLAG_NEW_LISTENER if one of the existing filters already
> has a listener. However, this check happens without holding any lock that
> would prevent another thread from concurrently installing a new filter
> (potentially with a listener) on top of the ones we already have.
> 
> Theoretically, this is also a data race: The plain load from
> current->seccomp.filter can race with concurrent writes to the same
> location.
> 
> [...]

Applied, thanks!

I added the stable CC, but I'd agree: it's not so urgent that I need to
get this into Linus's tree ahead of the regular merge window. :)

[1/1] seccomp: Make duplicate listener detection non-racy
      https://git.kernel.org/kees/c/ed2d479d3335

-- 
Kees Cook


      reply	other threads:[~2020-10-05 22:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  1:44 [PATCH resend] seccomp: Make duplicate listener detection non-racy Jann Horn
2020-10-05 22:30 ` Kees Cook [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=160193704489.2698420.14892403272288554518.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=jannh@google.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=tycho@tycho.pizza \
    --cc=wad@chromium.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).