# CVE-2026-31412: linux: In the Linux kernel, the following vulnerability has been resolved:  usb: gadget: f_mass_storage: Fix potential integ...

CVE-2026-31412 is fixed in 11 products on 1 platform, first by DEBIAN-CVE-2026-31412, released April 10, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-31412
- Priority: Routine
- CVSS: 5.5 (medium)
- EPSS: 0.0017
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 10, 2026

## Description

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 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | kernel-64kb sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-azure sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-default sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-default-base sles 15.7 | 6.4.0-150700.53.55.1.150700.17.33.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-docs sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-livepatch-SLE15-SP7_Update_15 sles 15.7 | 1-150700.15.3.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-obs-build sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-source sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-syms sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | kernel-zfcpdump sles 15.7 | 6.4.0-150700.53.55.1 | [SUSE-SU-2026:2238-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2238-1.md) | Jun 30, 2026 |
| Linux | linux Debian 12.15 (bookworm) | 6.1.170-1 | [DEBIAN-CVE-2026-31412](https://patchblox.com/security/data/fix/linux/debian-cve-2026-31412.md) | Apr 10, 2026 |
| Linux | linux Debian 13.5 (trixie) | 6.12.85-1 | [DEBIAN-CVE-2026-31412](https://patchblox.com/security/data/fix/linux/debian-cve-2026-31412.md) | Apr 10, 2026 |
| Linux | linux Debian 14 | 6.19.10-1 | [DEBIAN-CVE-2026-31412](https://patchblox.com/security/data/fix/linux/debian-cve-2026-31412.md) | Apr 10, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
