HIGH Introduced in 6.12
bpf Fastcall Bypass
CVE-2026-98048
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: bpf: don't rewrite bpf_fastcall patterns entered by a jump mark_fastcall_pattern_for_call() must ensure that matched "spill; call; fill" instruction series is not interrupted by a jump. Otherwise the rewrite applied by bpf_remove_fastcall_spills_fills() is not sound. Record the instructions targeted by jumps in insn_aux_data[*].jump_target when the CFG is built and use this flag to stop growing a pattern at such an instruction. Jumps to the first spill are fine. Note that existing insn_aux_data[*].jmp_point field can't be reused, as it marks subprogram return instructions.
02KernelScan AI Analysis
Risk summary
A flaw in the BPF verifier's fastcall optimization allows a crafted BPF program to bypass verifier safety checks. When a jump instruction targets the middle of a spill-call-fill pattern, the optimizer may remove spill/fill pairs that are needed by the jumped-to path, causing the executed program to differ from what was verified. Any process capable of loading BPF programs can trigger this; on systems with unprivileged BPF enabled, this includes unprivileged local users and containers.
Vulnerability analysis
The BPF verifier's fastcall optimization removes unnecessary register spill and fill instructions around helper calls to produce more efficient code. The pattern matching logic failed to account for cases where a jump instruction lands in the middle of a matched spill-call-fill sequence. When such a jump exists, the optimizer could remove spill/fill pairs that the jumped-to code path depends on, causing the rewritten program to use stale or incorrect register values. Since the verifier validates the original program but executes the rewritten one, this mismatch means the verifier's safety checks no longer apply to the actual executed code, potentially allowing a BPF program to access kernel memory it should not. The fix records which instructions are jump targets during control-flow graph construction and refuses to extend the optimization pattern past such instructions. The vulnerability is reachable by any process that can load BPF programs, which on systems with unprivileged BPF enabled includes unprivileged local users and containers.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.12 | 6.12.114 | a0cd1c3ac635 |
| 6.18 | 6.12 | 6.18.57 | c4d3bdb3ab21 |
| 7.2 | 6.12 | 7.2.7 | 24adbc2c3bbe |
| mainline | 6.12 | 7.3 | 0b1c83dc3c44 |
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) |