Skip to content
Heist/ feed
Back to feed
UnratedFix available

HID: core: Harden s32ton() against conversion to 0 bits

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: HID: core: Harden s32ton() against conversion to 0 bits Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the report or the device just because of that. Instead, harden the s32ton() routine so that it returns a reasonable result instead of crashing when it is called with the number of bits set to 0 -- the same as what snto32() does.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.248, 5.15.198, 6.1.159, 6.12.46, 6.15.10, 6.16.1, 6.6.119
CVEs
CVE-2025-38556
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 11:26 UTC · Revision 1

Source evidence

HID: core: Harden s32ton() against conversion to 0 bits

core-osv · Original source

Published 19 Aug 2025, 17:02 UTC

In the Linux kernel, the following vulnerability has been resolved: HID: core: Harden s32ton() against conversion to 0 bits Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the report or the device just because of that. Instead, harden the s32ton() routine so that it returns a reasonable result instead of crashing when it is called with the number of bits set to 0 -- the same as what snto32() does.

osv:CVE-2025-38556

Kernel

Fixed versions: 5.10.248, 5.15.198, 6.1.159, 6.6.119, 6.12.46, 6.15.10, 6.16.1

Complete source record
{
  "id": "4c9b4fa4b8e624ad39ea43d8988998bf6c49321d5321a31d9c93554abb208ab5",
  "url": "https://osv.dev/vulnerability/CVE-2025-38556",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "HID: core: Harden s32ton() against conversion to 0 bits",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: HID: core: Harden s32ton() against conversion to 0 bits Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the report or the device just because of that. Instead, harden the s32ton() routine so that it returns a reasonable result instead of crashing when it is called with the number of bits set to 0 -- the same as what snto32() does.",
    "evidence": "osv:CVE-2025-38556",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.248",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.198",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.159",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.119",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.46",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.10",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.16.1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-38556",
      "aliases": [
        "CVE-2025-38556"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "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"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.20"
                },
                {
                  "fixed": "5.10.248"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.198"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.159"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.119"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.46"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.15.10"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.16.0"
                },
                {
                  "fixed": "6.16.1"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38556.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.799385651Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/3c86548a20d7bc2861aa4de044991a327bebad1a",
        "https://git.kernel.org/stable/c/6cdf6c708717c5c6897d0800a1793e83757c7491",
        "https://git.kernel.org/stable/c/810189546cb6c8f36443ed091d91f1f5d2fc2ec7",
        "https://git.kernel.org/stable/c/865ad8469fa24de1559f247d9426ab01e5ce3a56",
        "https://git.kernel.org/stable/c/8b4a94b1510f6a46ec48494b52ee8f67eb4fc836",
        "https://git.kernel.org/stable/c/a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd",
        "https://git.kernel.org/stable/c/d3b504146c111548ab60b6ef7aad00bfb1db05a2",
        "https://git.kernel.org/stable/c/eeeaba737919bdce9885e2a00ac2912f61a3684d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38556.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38556",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38556.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38556",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 519129,
  "published_at": "2025-08-19T17:02:34.929+00:00"
}