From: Andrew Morton <akpm@linux-foundation.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org, Will Drewry <wad@chromium.org>,
Christian Brauner <brauner@kernel.org>,
linux-mm@kvack.org
Subject: Re: [PATCH v4 0/6] seccomp: non-cooperative pinned-memfd argument redirect
Date: Fri, 26 Jun 2026 21:43:45 -0700 [thread overview]
Message-ID: <20260626214345.5590f05f946872a7a9565c41@linux-foundation.org> (raw)
In-Reply-To: <20260627012219.1079851-1-xiyou.wangcong@gmail.com>
On Fri, 26 Jun 2026 18:22:13 -0700 Cong Wang <xiyou.wangcong@gmail.com> wrote:
> The seccomp user-notification SECCOMP_USER_NOTIF_FLAG_CONTINUE response
> carries an inherent TOCTOU: once the supervisor decides to let a syscall
> continue, the target (or a CLONE_VM peer) can rewrite the memory behind a
> pointer argument before the kernel reads it. This is documented in the
> UAPI header and is why the notifier "cannot be used to implement a
> security policy" today.
>
> The cooperative way around this is for the target to map a shared memfd
> and mseal() it during a trusted setup window, so the supervisor can hand
> the kernel an immutable buffer. That window does not exist for the common
> fork()+execve() sandbox model, where the supervisor wants to confine an
> uncooperative (or legacy) binary it did not write.
>
> This series lets the supervisor close the TOCTOU without any target-side
> cooperation:
AI review went crazy over this. I hope there's something useful in there:
https://sashiko.dev/#/patchset/20260627012219.1079851-1-xiyou.wangcong@gmail.com
next prev parent reply other threads:[~2026-06-27 4:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 1:22 Cong Wang
2026-06-27 1:22 ` [PATCH v4 1/6] mm: add __do_mmap() and vm_mmap_seal_remote() Cong Wang
2026-06-27 1:22 ` [PATCH v4 2/6] seccomp: introduce SECCOMP_IOCTL_NOTIF_PIN_INSTALL Cong Wang
2026-06-27 1:22 ` [PATCH v4 3/6] seccomp: add kernel-installed pinned-memfd redirect Cong Wang
2026-06-27 1:22 ` [PATCH v4 4/6] seccomp: re-validate a redirected syscall against outer filters Cong Wang
2026-06-27 1:22 ` [PATCH v4 5/6] selftests/seccomp: cover non-cooperative pinned-memfd install Cong Wang
2026-06-27 1:22 ` [PATCH v4 6/6] docs/seccomp: document pinned-memfd redirect ioctls Cong Wang
2026-06-27 4:43 ` Andrew Morton [this message]
2026-07-01 20:37 ` [PATCH v4 0/6] seccomp: non-cooperative pinned-memfd argument redirect Cong Wang
2026-06-27 8:19 ` Mike Rapoport
2026-07-01 20:40 ` Cong Wang
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=20260626214345.5590f05f946872a7a9565c41@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@amacapital.net \
--cc=wad@chromium.org \
--cc=xiyou.wangcong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®