HIGH Introduced in 6.6
bpf Verifier UAF
CVE-2026-90317
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
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.
02KernelScan AI Analysis
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.
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.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.6 | 6.18.57 | f81972b235f3 |
| 7.2 | 6.6 | 7.2.6 | 7ae71629357d |
| mainline | 6.6 | 7.3 | 180c7000712d |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.112-cip33) |