VDB

CVE-2026-31721

CVE-2026-31721 PUBLISHED

usb: gadget: f_hid: move list and spinlock inits from bind to alloc

Reported by linux · Published May 1, 2026

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_hid: move list and spinlock inits from bind to alloc There was an issue when you did the following: - setup and bind an hid gadget - open /dev/hidg0 - use the resulting fd in EPOLL_CTL_ADD - unbind the UDC - bind the UDC - use the fd in EPOLL_CTL_DEL When CONFIG_DEBUG_LIST was enabled, a list_del corruption was reported within remove_wait_queue (via ep_remove_wait_queue). After some debugging I found out that the queues, which f_hid registers via poll_wait were the problem. These were initialized using init_waitqueue_head inside hidg_bind. So effectively, the bind function re-initialized the queues while there were still items in them. The solution is to move the initialization from hidg_bind to hidg_alloc to extend their lifetimes to the lifetime of the function instance. Additionally, I found many other possibly problematic init calls in the bind function, which I moved as well.

EPSS 0.13% · 2.4th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux_kernellinux6.19.12, 6.18.22, 6.12.81, 6.6.135, 6.1.169, 5.15.203, 5.10.253

Risk scores

EPSS Score
0.13%
2.4th percentile

Affected products

VendorProductVersions
LinuxLinuxcb382536052fcc7713988869b54a81137069e5a9, cb382536052fcc7713988869b54a81137069e5a9, cb382536052fcc7713988869b54a81137069e5a9
LinuxLinux3.19, 0, 5.10.253
linuxlinux_kernel3.19, 3.19, 3.19
LinuxLinux*, *, *

Timeline

  • May 1, 2026 CVE Published
  • May 11, 2026 CVE Updated
  • May 18, 2026 EPSS Score (25 in total, the first dated here)
  • Jun 2, 2026 Security Advisory (120 in total, the first dated here)
  • Jul 28, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (114 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31721
vulnetix vdb fixes CVE-2026-31721

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31721/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›