Skip to main content
Mallory
High

Linux kernel BPF interpreter signed 32-bit division/modulo verifier mismatch

IdentifiersCVE-2026-31525CWE-682

CVE-2026-31525 is a Linux kernel BPF interpreter flaw in the signed 32-bit division and modulo paths (sdiv32/smod32). The vulnerable code uses the kernel abs() macro on s32 operands. Per the kernel's own documentation, abs() is undefined for the minimum value of a signed type. When the destination operand is S32_MIN (0x80000000), abs((s32)DST) exhibits undefined behavior and, on arm64 and x86, returns S32_MIN unchanged. That value is then sign-extended to u64 as 0xFFFFFFFF80000000, causing do_div() to compute an incorrect runtime result. The BPF verifier's abstract interpretation logic (including scalar32_min_max_sdiv) derives the mathematically correct result for range tracking, creating a verifier/interpreter mismatch. An attacker able to load a crafted BPF program can exploit this discrepancy to violate verifier assumptions and obtain out-of-bounds access to BPF map values. The upstream fix introduces abs_s32(), which safely handles S32_MIN by casting to u32 before negation, and replaces the affected abs((s32)...) call sites in the interpreter. The issue is specific to signed 32-bit handling; the s64 division/modulo handlers are not affected.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause the BPF interpreter to execute with semantics different from those validated by the verifier, enabling out-of-bounds access to BPF map values. Depending on kernel version, map layout, and reachable primitives, this can lead to unauthorized kernel memory disclosure and potentially arbitrary memory manipulation within the context of BPF-accessible objects. At minimum, it breaks core BPF safety guarantees by allowing a malicious program to bypass verifier range assumptions.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by disabling unprivileged BPF (for example, setting kernel.unprivileged_bpf_disabled=1) and restricting BPF program loading capabilities such as CAP_BPF to trusted administrators and required services only. Limit access to interfaces that permit BPF program loading and audit existing BPF programs for suspicious signed 32-bit division/modulo patterns involving S32_MIN.

Remediation

Patch, then assume compromise.

Update to a Linux kernel release containing the upstream fix for CVE-2026-31525, or backport/apply the vendor patch set that replaces the vulnerable abs((s32)...) usage in the BPF interpreter's sdiv32/smod32 handlers with the safe abs_s32() implementation. Validate that all affected call sites are patched and deploy the corrected kernel across impacted arm64 and x86 systems.
PUBLIC EXPLOITS

Exploits

No valid public exploits. Mallory filtered out 1 candidate as fakes, detection scripts, or README-only repos.

VALID 0 / 1 TOTALView more in app

All candidate exploits were filtered out by Mallory's validation.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LinuxLinux Kerneloperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity8

Community discussion across Reddit, Mastodon, and other social sources.