BPF List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Amery Hung <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org, alexei.starovoitov@gmail.com,
	andrii@kernel.org, daniel@iogearbox.net, kaiyanm@hust.edu.cn,
	dddddd@hust.edu.cn, dzm91@hust.edu.cn, kernel-team@meta.com
Subject: Re: [PATCH bpf-next v1 1/2] bpf: Disable file_alloc_security hook
Date: Fri, 28 Nov 2025 23:20:15 +0000	[thread overview]
Message-ID: <176437201504.828244.12198051182889256649.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20251126202927.2584874-1-ameryhung@gmail.com>

Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 26 Nov 2025 12:29:26 -0800 you wrote:
> A use-after-free bug may be triggered by calling bpf_inode_storage_get()
> in a BPF LSM program hooked to file_alloc_security. Disable the hook to
> prevent this from happening.
> 
> The cause of the bug is shown in the trace below. In alloc_file(), a
> file struct is first allocated through kmem_cache_alloc(). Then,
> file_alloc_security hook is invoked. Since the zero initialization or
> assignment of f->f_inode happen after this LSM hook, a BPF program may
> get a dangeld inode pointer by walking the file struct.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v1,1/2] bpf: Disable file_alloc_security hook
    https://git.kernel.org/bpf/bpf-next/c/b4bf1d23dc1d
  - [bpf-next,v1,2/2] selftests/bpf: Remove usage of lsm/file_alloc_security in selftest
    https://git.kernel.org/bpf/bpf-next/c/a3a60cc120d6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      parent reply	other threads:[~2025-11-28 23:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 20:29 [PATCH bpf-next v1 1/2] bpf: Disable file_alloc_security hook Amery Hung
2025-11-26 20:29 ` [PATCH bpf-next v1 2/2] selftests/bpf: Remove usage of lsm/file_alloc_security in selftest Amery Hung
2025-11-28 23:20 ` patchwork-bot+netdevbpf [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=176437201504.828244.12198051182889256649.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dddddd@hust.edu.cn \
    --cc=dzm91@hust.edu.cn \
    --cc=kaiyanm@hust.edu.cn \
    --cc=kernel-team@meta.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