CVE-2026-31721: Linux kernel · usb: gadget: f_hid: move list and spinlock inits from bind to alloc
Source GCVE Database
Not known to be exploited · CVSS 5.5 Medium.
Data as of 27 Oct 2026, 02:20 UTC
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 1 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
A fix is available that moves the initialization of wait queues from the bind function to the allocation function in the f_hid USB gadget driver. Users should apply the official Linux kernel patch that addresses this issue. Since this is a kernel-level vulnerability, updating to a fixed kernel version is the recommended remediation. No additional mitigation steps are indicated.
Description
CVE-2026-31721 is a medium severity vulnerability in the Linux kernel's USB gadget HID function. It involves improper initialization of wait queues in the f_hid driver during the bind operation, which can lead to list corruption when debug list checking is enabled. The issue occurs when binding and unbinding the USB device controller (UDC) while using file descriptors with epoll operations. The fix moves initialization of these queues from the bind function to the allocation function to ensure proper lifetime management.
References
- nvd.nist.gov/vuln/detail/CVE-2026-31721 (opens in a new tab)
- git.kernel.org/stable/c/13440c0db227c5db01da751ed966dde4cdd2ea18 (opens in a new tab)
- git.kernel.org/stable/c/26a879a41ed960b3fb4ec773ef2788c515c0e488 (opens in a new tab)
- git.kernel.org/stable/c/4e0a88254ad59f6c53a34bf5fa241884ec09e8b2 (opens in a new tab)
- git.kernel.org/stable/c/5d1bb391ceeebb28327703dd07af8c6324af298f (opens in a new tab)
- git.kernel.org/stable/c/81aee4500055876883658b024b6fb61801afe134 (opens in a new tab)
- git.kernel.org/stable/c/8ec6a58586f195a88479edcdb0b8027c39f12d03 (opens in a new tab)
- git.kernel.org/stable/c/de93e0862169b5539e00c2b9980b93fd80c37c0d (opens in a new tab)
- git.kernel.org/stable/c/f7d00ee1c8082c8a134340aaf16d71a27e29c362 (opens in a new tab)