CVE-2026-31525: bpf: Fix undefined behavior in interpreter sdiv/smod for INT_MIN
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix undefined behavior in interpreter sdiv/smod for INT_MIN
The BPF interpreter's signed 32-bit division and modulo handlers use
the kernel abs() macro on s32 operands. The abs() macro documentation
(include/linux/math.h) explicitly states the result is undefined when
the input is the type minimum. When DST contains S32_MIN (0x80000000),
abs((s32)DST) triggers undefined behavior and returns S32_MIN unchanged
on arm64/x86. This value is then sign-extended to u64 as
0xFFFFFFFF80000000, causing do_div() to compute the wrong result.
The verifier's abstract interpretation (scalar32_min_max_sdiv) computes
the mathematically correct result for range tracking, creating a
verifier/interpreter mismatch that can be exploited for out-of-bounds
map value access.
Introduce abs_s32() which handles S32_MIN correctly by casting to u32
before negating, avoiding signed overflow entirely. Replace all 8
abs((s32)...) call sites in the interpreter's sdiv32/smod32 handlers.
s32 is the only affected case -- the s64 division/modulo handlers do
not use abs().
Security readout for executives and security teams
Plain-English summary
A flaw in the Linux BPF interpreter can let a local, low-privileged attacker bypass safety assumptions and access memory outside an intended map value. Successful exploitation could compromise data, alter system state, or crash the host. The issue is limited to signed 32-bit division and modulo handling; the corresponding 64-bit handlers are not affected.
Executive priority
Treat as a high-priority kernel update, especially on shared or user-accessible Linux systems. Exploitation is local rather than remote, but successful abuse could affect data and host integrity or availability. No active exploitation is established by the supplied evidence, so prioritize based on affected-version confirmation and local-user exposure.
Technical view
Applying abs() to S32_MIN causes undefined behavior and an incorrectly sign-extended divisor in BPF sdiv32 and smod32 interpretation. The verifier calculates the correct mathematical range, creating a verifier/interpreter mismatch that can enable out-of-bounds BPF map-value access. The kernel fix introduces overflow-safe abs_s32() handling and replaces eight affected interpreter call sites.
Likely exposure
Exposure requires an affected Linux kernel and reachability of the BPF interpreter path by a local low-privileged user. The supplied data identifies affected releases including 6.6, 6.6.131, 6.12.80, 6.18.21, 6.19.11, and 7.0; the listed โ0โ entry is ambiguous and should be checked against vendor guidance.
Exploitation context
The CVSS vector describes local, low-complexity exploitation requiring low privileges and no user interaction, with potentially high confidentiality, integrity, and availability impact. The technical description says the mismatch can be exploited for out-of-bounds access. The supplied record is not in KEV and provides no evidence of active exploitation.
Researcher notes
The vulnerable behavior is specific to signed 32-bit interpreter division and modulo; s64 handlers do not use the affected abs() logic. The security boundary failure arises because verifier range tracking and runtime interpretation disagree for S32_MIN. No CWE is supplied. Exact downstream package applicability and fixed distribution versions are not established in the source bundle.
Mitigation direction
Apply a vendor kernel update containing the referenced abs_s32() fix or an equivalent backport.
Consult the Linux distribution or appliance vendor for exact fixed package versions.
Prioritize systems where low-privileged users can reach the affected BPF interpreter path.
Use vendor-recommended temporary restrictions if an immediate kernel update is unavailable.
Validation and detection
Inventory running kernel versions across Linux hosts, appliances, containers, and virtual-machine hosts.
Compare installed packages with vendor advisories and confirmed fixed builds.
Verify the deployed kernel contains the referenced fix or an equivalent vendor backport.
Assess whether local low-privileged users can reach the BPF interpreter path.
Reboot where required and confirm the fixed kernel is actively running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve ยท low confidence lookup
CVE-2026-31525 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
6Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.