Linux Kernel BPF Bug Forks Verifier, Allows OOB Map Access

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 formats

2 auto-generated detection rules for this incident, mapped to MITRE ATT&CK. Available in Sigma, Splunk SPL, Sentinel KQL, Elastic Lucene, and QRadar AQL.

high T1068 Privilege Escalation

Privilege Escalation Attempt Detection

Sigma Splunk SPL Sentinel KQL Elastic QRadar AQL

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

IDTypeIndicator
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

Related Posts

Critical RCE Flaw Hits NuGet Gallery Backend

CVE-2026-39399 — NuGet Gallery is a package repository that powers nuget.org. A security vulnerability exists in the NuGetGallery backend job’s handling of .nuspec files within...

vulnerabilityCVEcriticalhigh-severityremote-code-executioncwe-20cwe-22
/CRITICAL /⚑ 4 IOCs

BoidCMS LFI to RCE: A Critical Template Flaw

CVE-2026-39387 — BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are...

vulnerabilityCVEhigh-severityremote-code-executioncwe-98
/HIGH /⚑ 4 IOCs

Nanobot AI: WebSocket Hijack Puts WhatsApp Sessions at Risk

CVE-2026-35589 — nanobot is a personal AI assistant. Versions prior to 0.1.5 contain a Cross-Site WebSocket Hijacking (CSWSH) vulnerability exists in the bridge's WebSocket server...

vulnerabilityCVEhigh-severitycwe-1385
/HIGH /⚑ 5 IOCs