KernelScan.io

HIGH Introduced in 5.8

bpf RxQueueMapping VerifierBypass

CVE-2026-98590

CVSS 7.0 / 10.0 KernelScan AI

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

01

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).

02

Engine v0.9.0

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.

Affectednet/core/filter.c (bpf)

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.

03

BranchIntroducedFixed inPatch commit
5.105.85.10.271e3ddcf4aeb34
5.155.85.15.2224a41d064facc
6.15.86.1.18970288599d175
6.125.86.12.112b3f37afc7fd7
6.185.86.18.55d95dd5a6c6cd
6.65.86.6.158ea4dc96c902c
7.25.87.2.984ebb991ae98
mainline5.87.34a4852376e3a
cip/5.105.85.10.271-cip78e3ddcf4aeb34
cip/5.10-rt5.85.10.272-cip79-rt35e3ddcf4aeb34
cip/6.15.86.1.189-cip6170288599d175
cip/6.1-rt5.86.1.189-cip61-rt3270288599d175
cip/6.125.86.12.112-cip33b3f37afc7fd7

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35