HIGH Introduced in 5.5
bpf VmlinuxBtf Race
CVE-2026-93138
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix vmlinux BTF prep race in bpf_get_btf_vmlinux bpf_get_btf_vmlinux() lazily parses the vmlinux BTF under the bpf_verifier_lock, but publishes the result through a plain store and re-checks it through a plain lockless load. Nothing orders the stores initializing the struct btf inside btf_parse_vmlinux() against the store publishing the pointer: On a weakly ordered arch, a concurrent first-time caller taking the lockless fast path could in principle observe the pointer before the parsed contents are visible. The mutex_unlock() does not help such a reader given it only synchronizes with a later acquisition of the same lock. Thus, publish the pointer with smp_store_release() and read it on the fast path with smp_load_acquire(). Acquire semantics are needed rather than a dependency-ordered READ_ONCE(): btf_parse_vmlinux() also populates globals outside the returned object (e.g. bpf_ctx_convert.t). An address dependency would only order accesses performed through the pointer and not cover other globals.
02KernelScan AI Analysis
Risk summary
A race condition in the BPF verifier's lazy initialization of vmlinux BTF data can allow a concurrent BPF program load to observe a partially-initialized BTF object on weakly-ordered architectures. This could lead to kernel crashes or incorrect verifier behavior, potentially allowing malicious programs to pass validation. The bug requires local access with BPF loading privileges and concurrent first-time BTF parsing.
Vulnerability analysis
The kernel prepares built-in type information for the BPF verifier the first time a program is loaded. Because of a race condition, a concurrent loader can see that the data is ready before all of its contents have actually finished being written to memory, especially on certain processor architectures. This can cause the verifier to work with partially initialized information, leading to a kernel crash or to invalid programs being approved. The fix ensures that threads checking whether the data is ready are guaranteed to see the complete initialization that happened beforehand. Reaching the vulnerable path requires loading a BPF program, which needs CAP_BPF or CAP_SYS_ADMIN; on most distributions unprivileged BPF is disabled, so a local user with the appropriate capabilities is required to trigger the race.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.5 | 5.10.270 | f32a4a40bc63 |
| 5.15 | 5.5 | 5.15.221 | a7fe72d78012 |
| 6.1 | 5.5 | 6.1.188 | e18a10b39c99 |
| 6.12 | 5.5 | 6.12.110 | eaf302628a78 |
| 6.18 | 5.5 | 6.18.52 | 2892f3f44bf8 |
| 6.6 | 5.5 | 6.6.157 | 978524ecfc1c |
| 7.2 | 5.5 | 7.2.6 | 86d11c594d60 |
| mainline | 5.5 | 7.3 | 92863e678070 |
| cip/5.10 | 5.5 | 5.10.271-cip78 | f32a4a40bc63 |
| cip/6.1 | 5.5 | 6.1.189-cip61 | e18a10b39c99 |
| cip/6.1-rt | 5.5 | 6.1.189-cip61-rt32 | e18a10b39c99 |
| cip/6.12 | 5.5 | 6.12.111-cip32 | eaf302628a78 |
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 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |