HIGH Introduced in 5.13
bpf PseudoFunc Bypass
CVE-2026-98075
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: reject BPF_PSEUDO_FUNC reference to the main program fixups.c:jit_subprogs() rewrites BPF_PSEUDO_FUNC loads to contain real function addresses. This function is invoked from bpf_jit_subprogs() only when env->subprog_cnt > 1. Meaning that for any program like below: int main(void *ctx) { void *ptr = main; ... bpf_timer_set_callback(..., ptr); ... } The 'ptr' won't be ever converted to contain an address. In combination with e.g. bpf_timer_set_callback() this would lead to a function call at a bogus address. Instead of complicating the implementation, just assume that no useful program needs main to be a sync or async callback and reject BPF_PSEUDO_FUNC loads for the main subprogram.
02KernelScan AI Analysis
Risk summary
A BPF verifier gap allows a crafted program to use the main subprogram as a function pointer callback. When the program has only one subprogram, the JIT never resolves the placeholder to a real address, causing helpers like bpf_timer_set_callback to call a bogus, attacker-influenced address in kernel context. This is reachable locally via BPF program loading with CAP_BPF, which can be obtained in a user namespace, making it exploitable from containers on most default configurations.
Vulnerability analysis
The BPF verifier accepts programs that load a reference to the main subprogram as a function pointer. When the program has only one subprogram, the JIT compilation step that should convert that placeholder into a real kernel address is skipped entirely. If the program passes the unresolved pointer to a helper that later invokes it as a callback, the kernel calls an attacker-influenced address in kernel context. The fix adds a check in the verifier that rejects any program trying to use the main subprogram as a callback target, blocking the unsafe program before it is loaded. The issue can be triggered locally through the BPF program-loading interface by any process with CAP_BPF, a capability that unprivileged users can acquire inside a user namespace on most default kernels.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.13 | 5.15.222 | c74750dca96f |
| 6.1 | 5.13 | 6.1.189 | 314c8caa9cb6 |
| 6.12 | 5.13 | 6.12.111 | 118212417ba0 |
| 6.18 | 5.13 | 6.18.53 | d6c39774ae09 |
| 6.6 | 5.13 | 6.6.158 | 8cb75f7ada25 |
| 7.2 | 5.13 | 7.2.7 | 92f0bd0e2b63 |
| mainline | 5.13 | 7.3 | 374b2c5561db |
| cip/6.1 | 5.13 | 6.1.189-cip61 | 314c8caa9cb6 |
| cip/6.1-rt | 5.13 | 6.1.189-cip61-rt32 | 314c8caa9cb6 |
| cip/6.12 | 5.13 | 6.12.111-cip32 | 118212417ba0 |
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 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |