{"id":"CVE-2026-31624","aliases":["CVE-2026-31624"],"related":[],"kind":"vulnerability","state":"published","title":"HID: core: clamp report_size in s32ton() to avoid undefined shift","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: core: clamp report_size in s32ton() to avoid undefined shift\n\ns32ton() shifts by n-1 where n is the field's report_size, a value that\ncomes directly from a HID device.  The HID parser bounds report_size\nonly to <= 256, so a broken HID device can supply a report descriptor\nwith a wide field that triggers shift exponents up to 256 on a 32-bit\ntype when an output report is built via hid_output_field() or\nhid_set_field().\n\nCommit ec61b41918587 (\"HID: core: fix shift-out-of-bounds in\nhid_report_raw_event\") added the same n > 32 clamp to the function\nsnto32(), but s32ton() was never given the same fix as I guess syzbot\nhadn't figured out how to fuzz a device the same way.\n\nFix this up by just clamping the max value of n, just like snto32()\ndoes.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: core: clamp report_size in s32ton() to avoid undefined shift\n\ns32ton() shifts by n-1 where n is the field's report_size, a value that\ncomes directly from a HID device.  The HID parser bounds report_size\nonly to <= 256, so a broken HID device can supply a report descriptor\nwith a wide field that triggers shift exponents up to 256 on a 32-bit\ntype when an output report is built via hid_output_field() or\nhid_set_field().\n\nCommit ec61b41918587 (\"HID: core: fix shift-out-of-bounds in\nhid_report_raw_event\") added the same n > 32 clamp to the function\nsnto32(), but s32ton() was never given the same fix as I guess syzbot\nhadn't figured out how to fuzz a device the same way.\n\nFix this up by just clamping the max value of n, just like snto32()\ndoes.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: HID: core: limitar report_size en s32ton() para evitar un desplazamiento indefinido s32ton() desplaza por n-1 donde n es el report_size del campo, un valor que proviene directamente de un dispositivo HID. El analizador HID limita report_size solo a menor o igual que 256, por lo que un dispositivo HID defectuoso puede proporcionar un descriptor de informe con un campo amplio que activa exponentes de desplazamiento de hasta 256 en un tipo de 32 bits cuando se construye un informe de salida a través de hid_output_field() o hid_set_field(). El commit ec61b41918587 (’HID: core: corregir desplazamiento fuera de límites en hid_report_raw_event’) añadió la misma limitación n mayor que 32 a la función snto32(), pero s32ton() nunca recibió la misma corrección ya que supongo que syzbot no había descubierto cómo fuzzear un dispositivo de la misma manera. Corregir esto simplemente limitando el valor máximo de n, tal como lo hace snto32().","source":"nvd"}],"published":"2026-04-24T14:42:41.655Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"76ad02854a30c394e0c076e6e6bed0a388573a94","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"eb415ddaf25e09ddb8fe5736a70c9de2e6462534","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"0ab048dbdb1daacf17d52e9252297eb6e1298e49","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"932ae5309e53561197aa7d1606c7cf63af10e24f","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"58386f00af710922cafb0fb69211497beddfaa95","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"8a8333237f1f5caab8d4c3d2c2e7578c4263a97f","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"ea363a34086ddb4231adc581a7f36c39ec154bfc","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"97014719bb8fccb1ffcbbc299e84b1f11b114195","status":"affected"},{"type":"git","introduced":"dde5845a529ff753364a6d1aea61180946270bfa","fixed":"69c02ffde6ed4d535fa4e693a9e572729cad3d0d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.20","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.83","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.24","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.20.1","fixed":"6.6.136"},{"status":"affected","introduced":"6.7","fixed":"6.12.83"},{"status":"affected","introduced":"6.13","fixed":"6.18.24"},{"status":"affected","introduced":"6.19","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"},{"status":"affected","version":"2.6.20"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/76ad02854a30c394e0c076e6e6bed0a388573a94","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eb415ddaf25e09ddb8fe5736a70c9de2e6462534","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ab048dbdb1daacf17d52e9252297eb6e1298e49","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/932ae5309e53561197aa7d1606c7cf63af10e24f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/58386f00af710922cafb0fb69211497beddfaa95","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8a8333237f1f5caab8d4c3d2c2e7578c4263a97f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ea363a34086ddb4231adc581a7f36c39ec154bfc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/97014719bb8fccb1ffcbbc299e84b1f11b114195","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69c02ffde6ed4d535fa4e693a9e572729cad3d0d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:22:55.150Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31624","url":"https://www.cve.org/CVERecord?id=CVE-2026-31624","licence":"CVE Terms of Use","modified":"2026-11-06T15:32:20.146Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31624","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31624","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.520Z","epss":{"score":0.00134,"percentile":0.03132,"date":"2026-12-01T12:00:22.000Z"}}