Re: [PATCH v2] cgroup/rstat: validate cpu before css_rstat_cpu() access

From: patchwork-bot+netdevbpf

Date: Mon May 25 2026 - 09:53:49 EST


Hello:

This patch was applied to bpf/bpf.git (master)
by Tejun Heo <tj@xxxxxxxxxx>:

On Sat, 16 May 2026 15:08:49 +0800 you wrote:
> css_rstat_updated() is exposed as a BPF kfunc and accepts a
> caller-provided cpu argument. The function uses cpu for per-cpu rstat
> lookups without checking whether it refers to a valid possible CPU.
>
> A BPF iter/cgroup program with CAP_BPF and CAP_PERFMON can pass an
> invalid cpu value. On an unfixed UBSCAN_BOUNDS test kernel, cpu ==
> 0x7fffffff triggers:
>
> [...]

Here is the summary with links:
- [v2] cgroup/rstat: validate cpu before css_rstat_cpu() access
https://git.kernel.org/bpf/bpf/c/8817005efbdf

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