{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "8bd0488b5ea58655ad6fdcbe0408ef49b16882b1"
            },
            {
              "fixed": "d6efaa50af62fb0790dd1fd4e7e5506b46312510"
            },
            {
              "fixed": "73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1"
            },
            {
              "fixed": "eb57dae20fdf6f3069cdc07821fa3bb46de381d7"
            },
            {
              "fixed": "2b658c1c442ec1cd9eec5ead98d68662c40fe645"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.11.0"
            },
            {
              "fixed": "6.12.78"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.20"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "6.19.10"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31401.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nHID: bpf: prevent buffer overflow in hid_hw_request\n\nright now the returned value is considered to be always valid. However,\nwhen playing with HID-BPF, the return value can be arbitrary big,\nbecause it's the return value of dispatch_hid_bpf_raw_requests(), which\ncalls the struct_ops and we have no guarantees that the value makes\nsense.",
  "id": "CVE-2026-31401",
  "modified": "2026-07-15T01:48:55.198102545Z",
  "published": "2026-04-03T15:16:04.903Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2b658c1c442ec1cd9eec5ead98d68662c40fe645"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d6efaa50af62fb0790dd1fd4e7e5506b46312510"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/eb57dae20fdf6f3069cdc07821fa3bb46de381d7"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31401.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31401"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "HID: bpf: prevent buffer overflow in hid_hw_request"
}