KernelScan.io

HIGH Introduced in 6.6

bpf Verifier UAF

CVE-2026-90317

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: bpf: Invalidate RCU pointers after final spin unlock In a sleepable BPF program, a spin lock can provide the only RCU protection for a kptr. The final bpf_spin_unlock() ends that protection, but the verifier leaves the pointer valid. Another CPU can then free the object before the pointer is used. A capability-limited runtime PoC triggered a task_struct use-after-free in __bpf_get_task_stack(). Record whether the program is in an RCU-protected context before releasing the lock. Invalidate RCU-protected pointers only when the unlock leaves the final such context. This preserves valid pointers in non-sleepable programs and inside an explicit RCU read-side section.

02

Engine v0.6.0

Risk summary

A sleepable BPF program can use a spin lock as the only RCU protection for a kptr. After the final spin unlock, the verifier leaves the pointer valid, allowing another CPU to free the object before it is used, resulting in a use-after-free. An attacker with BPF loading privileges can trigger this to achieve kernel memory corruption, potentially escalating privileges or crashing the system.

Affectedkernel/bpf/verifier.c (bpf verifier)

Vulnerability analysis

In sleepable BPF programs, a spin lock can serve as the sole RCU protection for a kptr. When the final spin unlock ends that protection, the verifier previously left the pointer valid, so another CPU could free the underlying object before the program used it, causing a use-after-free. The fix records whether the program is in an RCU-protected context before releasing the lock and invalidates RCU-protected pointers only when the unlock leaves the final such context, preserving valid pointers in non-sleepable programs and explicit RCU read-side sections. The vulnerable surface is reachable by a local attacker who can load BPF programs, which requires CAP_BPF or equivalent privileges.

03

BranchIntroducedFixed inPatch commit
mainline6.67.3-rc1180c7000712d
7.26.67.2.67ae71629357d