HIGH Introduced in 5.8
bpf RxQueueMapping VerifierBypass
CVE-2026-98590
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix bpf_sock context code generation Currently, the ctx access code reads the rx_queue_mapping field with either a 4-byte or 2-byte load. The rest of the bits in the register are marked known zero by the verifier. However, the emitted ctx access code places in the register on certain the special value (-1) using BPF_MOV_IMM64, which gets sign-extended to turn on all the bits in the register. By shifting this value right, the program ends up with a value at runtime above what the verifier assumes is possible. Fix this by ensuring the read value is as wide as the assumed size. Use MOV32 instructions instead of MOV64 instructions to keep the upper bits zero as assumed by the verifier. Also properly report the size of the destination variable (the bpf_sock field, 4 bytes) instead of the source (the socket field, 2 bytes).
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_BPF (or in a user namespace with unprivileged BPF enabled) can load a crafted BPF program that exploits a verifier/code-generation mismatch in the bpf_sock rx_queue_mapping accessor. The verifier assumes upper register bits are zero, but the emitted MOV64_IMM instruction sign-extends -1, allowing the program to manufacture large values that bypass bounds checks and achieve arbitrary kernel memory read/write. This enables full kernel privilege escalation and container escape.
Vulnerability analysis
The BPF verifier tracks register state assuming that loading the rx_queue_mapping field (4 bytes in bpf_sock, 2 bytes in struct sock) leaves upper register bits zero. However, when the socket has no queue mapping, the JIT emits a 64-bit move of -1 (BPF_MOV64_IMM), which sign-extends and sets all upper bits. At runtime, shifting this value produces integers far larger than the verifier permits, letting a malicious BPF program bypass array bounds, map access, and pointer arithmetic checks. The fix replaces the 64-bit move with a 32-bit move (BPF_MOV32_IMM), which zero-extends on all supported architectures, and corrects the reported target size to match the 4-byte bpf_sock field. The vulnerability is reachable by any local process that can load BPF programs — typically requiring CAP_BPF or CAP_SYS_ADMIN, which may be available in user namespaces if unprivileged BPF is not disabled.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.8 | 5.10.271 | e3ddcf4aeb34 |
| 5.15 | 5.8 | 5.15.222 | 4a41d064facc |
| 6.1 | 5.8 | 6.1.189 | 70288599d175 |
| 6.12 | 5.8 | 6.12.112 | b3f37afc7fd7 |
| 6.18 | 5.8 | 6.18.55 | d95dd5a6c6cd |
| 6.6 | 5.8 | 6.6.158 | ea4dc96c902c |
| 7.2 | 5.8 | 7.2.9 | 84ebb991ae98 |
| mainline | 5.8 | 7.3 | 4a4852376e3a |
| cip/5.10 | 5.8 | 5.10.271-cip78 | e3ddcf4aeb34 |
| cip/5.10-rt | 5.8 | 5.10.272-cip79-rt35 | e3ddcf4aeb34 |
| cip/6.1 | 5.8 | 6.1.189-cip61 | 70288599d175 |
| cip/6.1-rt | 5.8 | 6.1.189-cip61-rt32 | 70288599d175 |
| cip/6.12 | 5.8 | 6.12.112-cip33 | b3f37afc7fd7 |
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.112-cip33 |
| 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 | Fixed in 5.10.272-cip79-rt35 |