BPF List
 help / color / mirror / Atom feed
From: Chris Mason <mason@kernel.org>
To: mason@kernel.org, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	eddyz87@gmail.com, memxor@gmail.com, brauner@kernel.org
Subject: [PATCH RFC 0/2] Fix use-after-free related to binfmt-misc-bpf.c
Date: Wed, 16 Sep 2026 18:33:01 +0000	[thread overview]
Message-ID: <20260916183303.3504885-1-mason@kernel.org> (raw)

Hi everyone,

Christian asked me to run the recent binfmt_misc_bpf.c changes through
reviews and this bug popped out.  The bug is reproduced, but I'm not at
all confident in the fix.

-chris

Chris Mason (2):
  bpf: fix UAF via trusted BTF walk after release
  selftests/bpf: test f_inode walk around bpf_put_file()

 kernel/bpf/verifier.c                         | 16 +++++++++++
 .../selftests/bpf/progs/verifier_vfs_accept.c | 26 ++++++++++++++++++
 .../selftests/bpf/progs/verifier_vfs_reject.c | 27 +++++++++++++++++++
 3 files changed, 69 insertions(+)

-- 
2.54.0


             reply	other threads:[~2026-09-16 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 18:33 Chris Mason [this message]
2026-09-16 18:33 ` [PATCH RFC 1/2] bpf: fix UAF via trusted BTF walk after release Chris Mason
2026-09-16 18:46   ` Kumar Kartikeya Dwivedi
2026-09-16 19:19     ` Chris Mason
2026-09-16 18:33 ` [PATCH RFC 2/2] selftests/bpf: test f_inode walk around bpf_put_file() Chris Mason

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=20260916183303.3504885-1-mason@kernel.org \
    --to=mason@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=memxor@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