Linux Kernel BPF Bug Forks Verifier, Allows OOB Map Access
A critical vulnerability, tracked as CVE-2026-31413, has been identified and patched in the Linux kernel. According to CVE Notify, the issue lies within the BPF verifier’s maybe_fork_scalars() function, specifically when handling the BPF_OR instruction with a constant source operand.
The core problem stems from an unsound scalar forking mechanism. When the destination register (dst) has a signed range of [-1, 0], the verifier incorrectly forks its state. For BPF_AND operations, this logic is sound: 0 & K correctly evaluates to 0. However, for BPF_OR, this logic breaks down. If the pushed path tracks dst as 0 while the runtime value is actually K (where 0 | K == K), it creates a divergence between what the verifier expects and what the runtime actually executes. This discrepancy can be exploited, leading to out-of-bounds map access, a classic primitive for privilege escalation or information disclosure.
The fix, as detailed in the kernel’s stable tree, involves passing env->insn_idx instead of env->insn_idx + 1 to push_stack(). This ensures that the pushed path re-executes the ALU instruction with dst = 0, allowing it to correctly compute the result for any opcode and thus eliminating the verifier/runtime divergence.
What This Means For You
- If your systems run Linux, this BPF vulnerability is a serious concern. An exploitable verifier/runtime divergence can lead to out-of-bounds map access, which is often a stepping stone for local privilege escalation. Ensure your Linux kernel is updated to a patched version to mitigate CVE-2026-31413 immediately. Check your distribution's security advisories and apply the necessary kernel updates.
Related ATT&CK Techniques
🛡️ Detection Rules
2 rules · 5 SIEM formats2 auto-generated detection rules for this incident, mapped to MITRE ATT&CK. Available in Sigma, Splunk SPL, Sentinel KQL, Elastic Lucene, and QRadar AQL.
Privilege Escalation Attempt Detection
Get this rule in your SIEM's native format — copy, paste, detect. No manual conversion.
2 Sigma rules mapped to the ATT&CK techniques from this breach — pick your SIEM and get a ready-to-paste query.
Get Detection Rules →Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2026-31413 | Privilege Escalation | Linux kernel BPF verifier unsound scalar forking in maybe_fork_scalars() for BPF_OR |
| CVE-2026-31413 | Out-of-bounds Read/Write | Linux kernel BPF verifier/runtime divergence leading to out-of-bounds map access |
| CVE-2026-31413 | Code Injection | Linux kernel BPF verifier logic error when source operand is a constant and dst has signed range [-1, 0] with BPF_OR |