All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: cve@kernel.org, linux-kernel@vger.kernel.org
Cc: linux-cve-announce@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Jinjie Ruan <ruanjinjie@huawei.com>
Subject: Re: CVE-2026-89603: entry: Fix seccomp bypass after ptrace with TSYNC
Date: Thu, 15 Oct 2026 09:25:02 -0700	[thread overview]
Message-ID: <20261015162119.1a1e0d-kees@kernel.org> (raw)
In-Reply-To: <2026091133-CVE-2026-89603-dad5@gregkh>

On Fri, Sep 11, 2026 at 09:44:52PM +0200, Greg Kroah-Hartman wrote:
> This race condition could allow an unprivileged process to execute
> a prohibited system call (e.g., execve) that the newly installed filter
> was intended to block, especially since the tracer might have modified
> the system call number during the ptrace stop.

I'm disputing this one: please reject CVE-2026-89603. The fix is a fine
consistency change, but the flaw gave neither the tracer nor the tracee
anything they didn't already have.

The missed check only affects a thread's first filter. Once a thread has
any filter, seccomp_run_filters() loads the current filter list when it
runs, so a filter synced during the ptrace stop applies anyway. So the
thread entered the syscall with no filter at all, and stopped under a
tracer that controlled it. That tracer could already have made it run
any syscall before the filter existed, or simply refused its seccomp()
call. No syscall gets past a filter that was in place when the syscall
started.

The same window exists without ptrace: TSYNC can land just after
syscall entry reads the work flags, and the syscall in flight runs
unfiltered. TSYNC has never applied to a syscall a thread has already
entered, only to its next one.

Sorry I missed this when the CVE originally went out! Thank you to
Oleg for calling this to my attention on the original patch's thread:
https://lore.kernel.org/all/as9Jqi5BvSZWfxj8@redhat.com/ :)

-Kees

-- 
Kees Cook

  reply	other threads:[~2026-10-15 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 19:44 CVE-2026-89603: entry: Fix seccomp bypass after ptrace with TSYNC Greg Kroah-Hartman
2026-10-15 16:25 ` Kees Cook [this message]
2026-10-15 16:34   ` Oleg Nesterov
2026-10-16  6:30     ` Greg Kroah-Hartman

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=20261015162119.1a1e0d-kees@kernel.org \
    --to=kees@kernel.org \
    --cc=cve@kernel.org \
    --cc=gregkh@kernel.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=ruanjinjie@huawei.com \
    /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.