{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2026-31721",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2026-31721",
    "idYear": 2026,
    "status": "PUBLISHED",
    "publishedAt": "2026-05-01T14:14:23.492Z",
    "updatedAt": "2026-05-11T22:14:28.436Z",
    "importedAt": "2026-10-24T01:58:02.025Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "usb: gadget: f_hid: move list and spinlock inits from bind to alloc",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_hid: move list and spinlock inits from bind to alloc\n\nThere was an issue when you did the following:\n- setup and bind an hid gadget\n- open /dev/hidg0\n- use the resulting fd in EPOLL_CTL_ADD\n- unbind the UDC\n- bind the UDC\n- use the fd in EPOLL_CTL_DEL\n\nWhen CONFIG_DEBUG_LIST was enabled, a list_del corruption was reported\nwithin remove_wait_queue (via ep_remove_wait_queue). After some\ndebugging I found out that the queues, which f_hid registers via\npoll_wait were the problem. These were initialized using\ninit_waitqueue_head inside hidg_bind. So effectively, the bind function\nre-initialized the queues while there were still items in them.\n\nThe solution is to move the initialization from hidg_bind to hidg_alloc\nto extend their lifetimes to the lifetime of the function instance.\n\nAdditionally, I found many other possibly problematic init calls in the\nbind function, which I moved as well.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "13440c0db227c5db01da751ed966dde4cdd2ea18"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "de93e0862169b5539e00c2b9980b93fd80c37c0d"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "81aee4500055876883658b024b6fb61801afe134"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "8ec6a58586f195a88479edcdb0b8027c39f12d03"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f7d00ee1c8082c8a134340aaf16d71a27e29c362"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "5d1bb391ceeebb28327703dd07af8c6324af298f"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "26a879a41ed960b3fb4ec773ef2788c515c0e488"
            },
            {
              "version": "cb382536052fcc7713988869b54a81137069e5a9",
              "status": "affected",
              "versionType": "git",
              "lessThan": "4e0a88254ad59f6c53a34bf5fa241884ec09e8b2"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "3.19",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "3.19"
            },
            {
              "version": "5.10.253",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.203",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.1.169",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.135",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.12.81",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "version": "6.18.22",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "version": "6.19.12",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.19.*"
            },
            {
              "version": "7.0",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}