{"id":"CVE-2025-38556","summary":"HID: core: Harden s32ton() against conversion to 0 bits","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: core: Harden s32ton() against conversion to 0 bits\n\nTesting by the syzbot fuzzer showed that the HID core gets a\nshift-out-of-bounds exception when it tries to convert a 32-bit\nquantity to a 0-bit quantity.  Ideally this should never occur, but\nthere are buggy devices and some might have a report field with size\nset to zero; we shouldn't reject the report or the device just because\nof that.\n\nInstead, harden the s32ton() routine so that it returns a reasonable\nresult instead of crashing when it is called with the number of bits\nset to 0 -- the same as what snto32() does.","modified":"2026-04-02T12:48:01.702628Z","published":"2025-08-19T17:02:34.929Z","related":["ALSA-2025:16372","ALSA-2025:17760","ALSA-2025:17776","SUSE-SU-2025:03204-1","SUSE-SU-2025:03600-1","SUSE-SU-2025:03601-1","SUSE-SU-2025:03602-1","SUSE-SU-2025:03633-1","SUSE-SU-2025:03634-1","SUSE-SU-2025:20851-1","SUSE-SU-2025:20861-1","SUSE-SU-2025:20870-1","SUSE-SU-2025:20898-1","SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","SUSE-SU-2025:3725-1","SUSE-SU-2025:3751-1","openSUSE-SU-2025:20081-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38556.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3c86548a20d7bc2861aa4de044991a327bebad1a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6cdf6c708717c5c6897d0800a1793e83757c7491"},{"type":"WEB","url":"https://git.kernel.org/stable/c/810189546cb6c8f36443ed091d91f1f5d2fc2ec7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/865ad8469fa24de1559f247d9426ab01e5ce3a56"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8b4a94b1510f6a46ec48494b52ee8f67eb4fc836"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d3b504146c111548ab60b6ef7aad00bfb1db05a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eeeaba737919bdce9885e2a00ac2912f61a3684d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38556.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38556"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"dde5845a529ff753364a6d1aea61180946270bfa"},{"fixed":"6cdf6c708717c5c6897d0800a1793e83757c7491"},{"fixed":"eeeaba737919bdce9885e2a00ac2912f61a3684d"},{"fixed":"3c86548a20d7bc2861aa4de044991a327bebad1a"},{"fixed":"810189546cb6c8f36443ed091d91f1f5d2fc2ec7"},{"fixed":"d3b504146c111548ab60b6ef7aad00bfb1db05a2"},{"fixed":"8b4a94b1510f6a46ec48494b52ee8f67eb4fc836"},{"fixed":"865ad8469fa24de1559f247d9426ab01e5ce3a56"},{"fixed":"a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38556.json"}}],"schema_version":"1.7.5"}