# CVE-2026-31624: HID: core: clamp report\_size in s32ton() to avoid undefined shift

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-28)
- **Published:** 2026-04-24T14:42:41.655Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 76ad02854a30c394e0c076e6e6bed0a388573a94; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< eb415ddaf25e09ddb8fe5736a70c9de2e6462534; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 0ab048dbdb1daacf17d52e9252297eb6e1298e49; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 932ae5309e53561197aa7d1606c7cf63af10e24f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 58386f00af710922cafb0fb69211497beddfaa95; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ea363a34086ddb4231adc581a7f36c39ec154bfc; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 97014719bb8fccb1ffcbbc299e84b1f11b114195; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 69c02ffde6ed4d535fa4e693a9e572729cad3d0d
- Anyone running Linux 2.6.20

## Description

In the Linux kernel, the following vulnerability has been resolved:

HID: core: clamp report\_size in s32ton() to avoid undefined shift

s32ton() shifts by n-1 where n is the field's report\_size, a value that
comes directly from a HID device.  The HID parser bounds report\_size
only to \<= 256, so a broken HID device can supply a report descriptor
with a wide field that triggers shift exponents up to 256 on a 32-bit
type when an output report is built via hid\_output\_field() or
hid\_set\_field().

Commit ec61b41918587 ("HID: core: fix shift-out-of-bounds in
hid\_report\_raw\_event") added the same n \> 32 clamp to the function
snto32(), but s32ton() was never given the same fix as I guess syzbot
hadn't figured out how to fuzz a device the same way.

Fix this up by just clamping the max value of n, just like snto32()
does.

## Affected and fixed versions

- Linux: \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 76ad02854a30c394e0c076e6e6bed0a388573a94; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< eb415ddaf25e09ddb8fe5736a70c9de2e6462534; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 0ab048dbdb1daacf17d52e9252297eb6e1298e49; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 932ae5309e53561197aa7d1606c7cf63af10e24f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 58386f00af710922cafb0fb69211497beddfaa95; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ea363a34086ddb4231adc581a7f36c39ec154bfc; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 97014719bb8fccb1ffcbbc299e84b1f11b114195; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 69c02ffde6ed4d535fa4e693a9e572729cad3d0d (cvelist)
- Linux: 2.6.20 (cvelist)

## Mitigation

- Upgrade Linux to 69c02ffde6ed4d535fa4e693a9e572729cad3d0d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31624. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31624.md
Affected: Linux >= dde5845a529ff753364a6d1aea61180946270bfa, < 76ad02854a30c394e0c076e6e6bed0a388573a94; >= dde5845a529ff753364a6d1aea61180946270bfa, < eb415ddaf25e09ddb8fe5736a70c9de2e6462534; >= dde5845a529ff753364a6d1aea61180946270bfa, < 0ab048dbdb1daacf17d52e9252297eb6e1298e49; >= dde5845a529ff753364a6d1…
Fixed in: Linux 76ad02854a30c394e0c076e6e6bed0a388573a94, Linux 0ab048dbdb1daacf17d52e9252297eb6e1298e49, Linux 932ae5309e53561197aa7d1606c7cf63af10e24f, Linux 58386f00af710922cafb0fb69211497beddfaa95, Linux 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f, Linux 97014719bb8fccb1ffcbbc299e84b1f11b114195, Linux 69c02…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31624 being exploited?

There is no confirmed exploitation: CVE-2026-31624 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31624?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31624?

Linux \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 76ad02854a30c394e0c076e6e6bed0a388573a94; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< eb415ddaf25e09ddb8fe5736a70c9de2e6462534; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 0ab048dbdb1daacf17d52e9252297eb6e1298e49; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 932ae5309e53561197aa7d1606c7cf63af10e24f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 58386f00af710922cafb0fb69211497beddfaa95; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ea363a34086ddb4231adc581a7f36c39ec154bfc; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 97014719bb8fccb1ffcbbc299e84b1f11b114195; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 69c02ffde6ed4d535fa4e693a9e572729cad3d0d; Linux 2.6.20.

### Is there a fix for CVE-2026-31624?

Yes. Fixed in Linux 76ad02854a30c394e0c076e6e6bed0a388573a94, Linux 0ab048dbdb1daacf17d52e9252297eb6e1298e49, Linux 932ae5309e53561197aa7d1606c7cf63af10e24f, Linux 58386f00af710922cafb0fb69211497beddfaa95, Linux 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f, Linux 97014719bb8fccb1ffcbbc299e84b1f11b114195, Linux 69c02ffde6ed4d535fa4e693a9e572729cad3d0d. Upgrade Linux to 69c02ffde6ed4d535fa4e693a9e572729cad3d0d or later.

### How do I check if I'm affected by CVE-2026-31624?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/932ae5309e53561197aa7d1606c7cf63af10e24f>
- patch: <https://git.kernel.org/stable/c/58386f00af710922cafb0fb69211497beddfaa95>
- patch: <https://git.kernel.org/stable/c/8a8333237f1f5caab8d4c3d2c2e7578c4263a97f>
- patch: <https://git.kernel.org/stable/c/ea363a34086ddb4231adc581a7f36c39ec154bfc>
- patch: <https://git.kernel.org/stable/c/97014719bb8fccb1ffcbbc299e84b1f11b114195>
- patch: <https://git.kernel.org/stable/c/69c02ffde6ed4d535fa4e693a9e572729cad3d0d>
- other: <https://git.kernel.org/stable/c/76ad02854a30c394e0c076e6e6bed0a388573a94>
- other: <https://git.kernel.org/stable/c/eb415ddaf25e09ddb8fe5736a70c9de2e6462534>
- other: <https://git.kernel.org/stable/c/0ab048dbdb1daacf17d52e9252297eb6e1298e49>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31624>

HTML: <https://flawdb.com/CVE-2026-31624> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31624>
