{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "cb382536052fcc7713988869b54a81137069e5a9"
            },
            {
              "fixed": "c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43"
            },
            {
              "fixed": "eb6ef6185f2054a341ec70d7e2165f5381744215"
            },
            {
              "fixed": "5a229016ca3ac551294ec59770be9da94ec4bf63"
            },
            {
              "fixed": "75ecc46828ec377dd5692c677168ef6d64fd7123"
            },
            {
              "fixed": "81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.19.0"
            },
            {
              "fixed": "6.12.83"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.24"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "6.19.14"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.20.0"
            },
            {
              "fixed": "7.0.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31606.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_hid: don't call cdev_init while cdev in use\n\nWhen calling unbind, then bind again, cdev_init reinitialized the cdev,\neven though there may still be references to it. That's the case when\nthe /dev/hidg* device is still opened. This obviously unsafe behavior\nlike oopes.\n\nThis fixes this by using cdev_alloc to put the cdev on the heap. That\nway, we can simply allocate a new one in hidg_bind.",
  "id": "CVE-2026-31606",
  "modified": "2026-07-15T01:49:18.267220614Z",
  "published": "2026-04-24T14:42:28.792Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5a229016ca3ac551294ec59770be9da94ec4bf63"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/75ecc46828ec377dd5692c677168ef6d64fd7123"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/eb6ef6185f2054a341ec70d7e2165f5381744215"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31606.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31606"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.8.0",
  "summary": "usb: gadget: f_hid: don't call cdev_init while cdev in use"
}