From: patchwork-bot+netdevbpf@kernel.org
To: Jann Horn <jannh@google.com>
Cc: song@kernel.org, jolsa@kernel.org, kpsingh@kernel.org,
mattbobrowski@google.com, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
yonghong.song@linux.dev, john.fastabend@gmail.com,
sdf@fomichev.me, haoluo@google.com, rostedt@goodmis.org,
mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
delyank@fb.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
Date: Tue, 10 Dec 2024 18:30:31 +0000 [thread overview]
Message-ID: <173385543176.937529.2200344298659513715.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20241210-bpf-fix-actual-uprobe-uaf-v1-1-19439849dd44@google.com>
Hello:
This patch was applied to bpf/bpf.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Tue, 10 Dec 2024 17:32:13 +0100 you wrote:
> Uprobes always use bpf_prog_run_array_uprobe() under tasks-trace-RCU
> protection. But it is possible to attach a non-sleepable BPF program to a
> uprobe, and non-sleepable BPF programs are freed via normal RCU (see
> __bpf_prog_put_noref()). This leads to UAF of the bpf_prog because a normal
> RCU grace period does not imply a tasks-trace-RCU grace period.
>
> Fix it by explicitly waiting for a tasks-trace-RCU grace period after
> removing the attachment of a bpf_prog to a perf_event.
>
> [...]
Here is the summary with links:
- bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
https://git.kernel.org/bpf/bpf/c/ef1b808e3b7c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2024-12-10 18:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 16:32 [PATCH] bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors Jann Horn
2024-12-10 18:30 ` 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=173385543176.937529.2200344298659513715.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=delyank@fb.com \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=jannh@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mathieu.desnoyers@efficios.com \
--cc=mattbobrowski@google.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yonghong.song@linux.dev \
/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