← Back to CVE Explorer

CVE-2026-98860

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: HID: bpf: cast size to ssize_t when checking hid_bpf_hw_request As reported by Sashiko: If a transport driver encounters a hardware error and returns a negative error code such as -EPIPE, ret is implicitly promoted to size_t when compared against size. This causes the negative error code to evaluate as a large positive number, making the (ret > size) condition true. This silently converts the hardware error into a success return value and copies the unmodified buffer back, which could leave BPF programs operating on uninitialized or stale data. Fix this by casting size into ssize_t to return the actual negative error code.

Severity
Not scored
CVSS score
Not available
Vulnerability status
Received
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-10-18 16:17:40.470000
Last modified
2026-10-19 10:19:50.087000
View original CVE JSON
{
  "id": "CVE-2026-98860",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-10-18T16:17:40.470",
  "lastModified": "2026-10-19T10:19:50.087",
  "vulnStatus": "Received",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nHID: bpf: cast size to ssize_t when checking hid_bpf_hw_request\n\nAs reported by Sashiko:\nIf a transport driver encounters a hardware error and returns a negative\nerror code such as -EPIPE, ret is implicitly promoted to size_t when\ncompared against size. This causes the negative error code to evaluate\nas a large positive number, making the (ret > size) condition true.\n\nThis silently converts the hardware error into a success return value\nand copies the unmodified buffer back, which could leave BPF programs\noperating on uninitialized or stale data.\n\nFix this by casting size into ssize_t to return the actual negative\nerror code."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/hid/bpf/hid_bpf_dispatch.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "d6efaa50af62fb0790dd1fd4e7e5506b46312510",
              "lessThan": "8b85ef0f561039e249c3f883c5280a1449c6dbee",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1",
              "lessThan": "97be6396817bd3b11d06239010d27902940bfaa9",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "2b658c1c442ec1cd9eec5ead98d68662c40fe645",
              "lessThan": "f9f808227554b2c116fd07dd2328ecd74ea3f411",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "2b658c1c442ec1cd9eec5ead98d68662c40fe645",
              "lessThan": "3afefbfe55c2a8a0c4bdf6f4cc1f773da120027c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "eb57dae20fdf6f3069cdc07821fa3bb46de381d7",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "6.12.78",
              "lessThan": "6.12.113",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "6.18.20",
              "lessThan": "6.18.56",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "6.19.10",
              "lessThan": "6.20",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/hid/bpf/hid_bpf_dispatch.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "7.0",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "7.0",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.113",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.56",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2.10",
              "lessThanOrEqual": "7.2.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.3",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {},
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/3afefbfe55c2a8a0c4bdf6f4cc1f773da120027c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/8b85ef0f561039e249c3f883c5280a1449c6dbee",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/97be6396817bd3b11d06239010d27902940bfaa9",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/f9f808227554b2c116fd07dd2328ecd74ea3f411",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}