Cyber Resilience

CVE-2026-31412

Memory Safety in Linux Kernel 3.3 – 6.1.167

Published
10 April 2026
Modified
20 May 2026
Patch / advisory
CVSS Score v3.1 5.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0017 7th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2026-31412 is a medium-severity Integer Overflow or Wraparound (CWE-190) vulnerability in Linux Linux Kernel. Its CVSS base score is 5.5 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 7th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SI-2 (Flaw Remediation) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_mass_storage: Fix potential integer overflow in check_command_size_in_blocks() The `check_command_size_in_blocks()` function calculates the data size in bytes by left shifting `common->data_size_from_cmnd` by the block size (`common->curlun->blkbits`). However, it does…

more

not validate whether this shift operation will cause an integer overflow. Initially, the block size is set up in `fsg_lun_open()` , and the `common->data_size_from_cmnd` is set up in `do_scsi_command()`. During initialization, there is no integer overflow check for the interaction between two variables. So if a malicious USB host sends a SCSI READ or WRITE command requesting a large amount of data (`common->data_size_from_cmnd`), the left shift operation can wrap around. This results in a truncated data size, which can bypass boundary checks and potentially lead to memory corruption or out-of-bounds accesses. Fix this by using the check_shl_overflow() macro to safely perform the shift and catch any overflows.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Why these techniques?

Integer overflow in kernel USB gadget leads to memory corruption, directly enabling local/kernel privilege escalation via crafted USB/SCSI input.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2026-45990Same product: Linux Linux Kernel
CVE-2026-46198Same product: Linux Linux Kernel
CVE-2026-46062Same product: Linux Linux Kernel
CVE-2026-52972Same product: Linux Linux Kernel
CVE-2026-31648Same product: Linux Linux Kernel
CVE-2026-31491Same product: Linux Linux Kernel
CVE-2026-46023Same product: Linux Linux Kernel
CVE-2026-53068Same product: Linux Linux Kernel
CVE-2026-46039Same product: Linux Linux Kernel
CVE-2026-31641Same product: Linux Linux Kernel

Affected Assets

linux
linux kernel
7.0 · 3.3 — 6.1.167 · 6.2 — 6.6.130 · 6.7 — 6.12.78

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-10 Information Input Validation
  • SI-2 Flaw Remediation
  • SI-16 Memory Protection
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V5.2.6

Mitigating Controls (NIST 800-53 r5) AI

prevent

Validates SCSI command parameters (data_size_from_cmnd) from the USB host before the blkbits shift, directly blocking the integer overflow.

prevent

Requires application of the kernel patch that replaces the unchecked shift with check_shl_overflow() to eliminate the CWE-190 flaw.

prevent

Enforces memory bounds checking that can contain or block the out-of-bounds accesses resulting from a truncated size calculation.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require use of safe arithmetic, bounds checks, and testing that prevent integer overflows.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing in development can detect integer overflows before release.

prevents

Secure SDLC mandates input validation and arithmetic checks that prevent integer overflows.

degrades

Application security requirements include bounds checking and safe arithmetic to avoid overflow conditions.

degrades

Secure architecture principles require defensive coding patterns that mitigate integer wraparound risks.

prevents

Secure coding standards explicitly forbid unsafe integer operations and mandate overflow-safe constructs.

References