KernelScan.io

HIGH Introduced in 5.13

bpf PseudoFunc Bypass

CVE-2026-98075

CVSS 8.5 / 10.0 KernelScan AI

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

01

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.

02

Engine v0.6.0

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.

Affectedkernel/bpf/verifier.c (bpf verifier)

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.

03

BranchIntroducedFixed inPatch commit
5.155.135.15.222c74750dca96f
6.15.136.1.189314c8caa9cb6
6.65.136.6.1588cb75f7ada25
6.125.136.12.111118212417ba0
6.185.136.18.53d6c39774ae09
7.25.137.2.792f0bd0e2b63
mainline5.137.3-rc2374b2c5561db
cip/6.125.136.12.111-cip32118212417ba0