CVE-2026-99332: HID: core: Fix out-of-bounds left shift by 32 in s32ton()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
HID: core: Fix out-of-bounds left shift by 32 in s32ton()
Syzbot reported an out-of-bounds shift (32-bit integer shifted left by
32) in the s32ton() routine in the HID core. This routine converts a signed 32-bit integer to a signed n-bit integer, and it caps the value of n at 32. But when n == 32 there's no need to do anything; it can simply return the input value. This will avoid calculating (1 << n) when n is 32, which was the cause of the invalid shift.
The Linux kernel CVE team has assigned CVE-2026-99332 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12.83 with commit 58386f00af710922cafb0fb69211497beddfaa95 and fixed in 6.12.117 with commit 8bc6279634b03222d79788481810562a7d3564fe Issue introduced in 6.18.24 with commit 8a8333237f1f5caab8d4c3d2c2e7578c4263a97f and fixed in 6.18.61 with commit 076bea989f998f4d5a62d74de2f04f6f5b94b3f3 Issue introduced in 7.1 with commit 69c02ffde6ed4d535fa4e693a9e572729cad3d0d and fixed in 7.3.2 with commit 20518a118bf185e72f769eb07aeed5848c095d31 Issue introduced in 7.1 with commit 69c02ffde6ed4d535fa4e693a9e572729cad3d0d and fixed in 7.4-rc1 with commit 5fe63b415c636c7f4f6848a8e53bdd4bbf0c300d Issue introduced in 5.10.258 with commit 76ad02854a30c394e0c076e6e6bed0a388573a94 Issue introduced in 5.15.209 with commit eb415ddaf25e09ddb8fe5736a70c9de2e6462534 Issue introduced in 6.1.175 with commit 0ab048dbdb1daacf17d52e9252297eb6e1298e49 Issue introduced in 6.6.136 with commit 932ae5309e53561197aa7d1606c7cf63af10e24f Issue introduced in 6.19.14 with commit ea363a34086ddb4231adc581a7f36c39ec154bfc Issue introduced in 7.0.1 with commit 97014719bb8fccb1ffcbbc299e84b1f11b114195
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99332
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/hid/hid-core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8bc6279634b03222d79788481810562a7d3564fe https://git.kernel.org/stable/c/076bea989f998f4d5a62d74de2f04f6f5b94b3f3 https://git.kernel.org/stable/c/20518a118bf185e72f769eb07aeed5848c095d31 https://git.kernel.org/stable/c/5fe63b415c636c7f4f6848a8e53bdd4bbf0c300d