PatchSiren cyber security CVE debrief
CVE-2026-31412 Linux CVE debrief
CVE-2026-31412 is a Linux kernel issue in the USB gadget mass-storage function (`f_mass_storage`). The vulnerable path calculates a command data size by left shifting `common->data_size_from_cmnd` by the logical block size without first checking for overflow. According to the published fix notes, a large SCSI READ or WRITE request can cause the shifted size to wrap, which may truncate boundary calculations and create a risk of memory corruption or out-of-bounds access. The issue was publicly published on 2026-04-10 and later updated by NVD on 2026-05-20 with stable-kernel patch references.
- Vendor
- Linux
- Product
- Unknown
- CVSS
- MEDIUM 5.5
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-04-10
- Original CVE updated
- 2026-05-20
- Advisory published
- 2026-04-10
- Advisory updated
- 2026-05-20
Who should care
Linux kernel maintainers, distro security teams, embedded and appliance vendors shipping USB gadget functionality, and operators who rely on `f_mass_storage` on devices exposed to untrusted USB interactions.
Technical summary
NVD lists the weakness as CWE-190 (integer overflow) with CVSS 3.1 vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. The vulnerable function `check_command_size_in_blocks()` left-shifts `common->data_size_from_cmnd` by `common->curlun->blkbits` to derive a byte size, but the published description says the code did not validate whether the shift would overflow. The fix uses `check_shl_overflow()` to detect overflow before the shifted value is used. NVD also lists affected Linux kernel ranges ending before 6.1.167, 6.6.130, 6.12.78, 6.18.19, and 6.19.9, plus 7.0 release candidates through rc4.
Defensive priority
Medium. The issue is kernel-level, the impact can include availability loss and possible memory-safety consequences, but the CVSS score is 5.5 and the attack vector is scored as local in the NVD record. Prioritize remediation for systems that expose USB gadget mass-storage functionality.
Recommended defensive actions
- Apply the vendor/stable kernel patches referenced by NVD for CVE-2026-31412.
- Upgrade affected kernels to versions newer than the fixed ranges listed by NVD: 6.1.167, 6.6.130, 6.12.78, 6.18.19, and 6.19.9, or equivalent backported fixes.
- If USB gadget mass-storage is not required, disable or remove `f_mass_storage` exposure on affected systems.
- Review embedded, appliance, and test systems that can present a USB gadget interface to ensure the fix is backported and deployed consistently.
- Verify that downstream kernel builds include the overflow check in `check_command_size_in_blocks()` and that the patch matches the linked stable commits.
Evidence notes
This debrief is based only on the supplied CVE/NVD corpus. The CVE was published at 2026-04-10T11:16:22.967Z and modified at 2026-05-20T15:54:46.070Z. NVD marks the record as analyzed, assigns CVSS 5.5/Medium, identifies CWE-190, and lists six stable-kernel patch references from git.kernel.org. The resource links and affected-version ranges come from the provided NVD metadata.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-31412 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-31412
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-31412 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-31412
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/228b37936376143f4b60cc6828663f6eaceb81b5
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/3428dc5520c811e66622b2f5fa43341bf9a1f8b3
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/387ebb0453b99d71491419a5dc4ab4bee0cacbac
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/8479891d1f04a8ce55366fe4ca361ccdb96f02e1
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/91817ad5452defe69bc7bc0e355f0ed5d01125cc
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://git.kernel.org/stable/c/ce0caaed5940162780c5c223b8ae54968a5f059b
416baaa9-dc9f-4396-8d5f-8c081fb06d67 - Patch
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.