CVE-2026-31721
Last modified
CVE-2026-31721 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. 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. EPSS estimates a 0.12% chance of exploitation in the next 30 days.
Description
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 3.19, < 5.10.253 | — |
| Linux | Linux Kernel | >= 5.11, < 5.15.203 | — |
| Linux | Linux Kernel | >= 5.16, < 6.1.169 | — |
| Linux | Linux Kernel | >= 6.2, < 6.6.135 | — |
| Linux | Linux Kernel | >= 6.7, < 6.12.81 | — |
| Linux | Linux Kernel | >= 6.13, < 6.18.22 | — |
| Linux | Linux Kernel | >= 6.19, < 6.19.12 | — |
| Linux | Linux Kernel | 7.0 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-31721?
How severe is CVE-2026-31721?
How do I fix CVE-2026-31721?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-31716In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31717In the Linux kernel, the following vulnerability has been re…8.8
- CVE-2026-31718In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-31719In the Linux kernel, the following vulnerability has been re…7.5
- CVE-2026-3172Buffer overflow in parallel HNSW index build in pgvector 0.6…8.1
- CVE-2026-31720In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31722In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31723In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31724In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31725In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31726In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31727In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2026-31721?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
