CVE-2026-31606 Details
Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_hid: don't call cdev_init while cdev in use When calling unbind, then bind again, cdev_init reinitialized the cdev, even though there may still be references to it. That's the case when the /dev/hidg* device is still opened. This obviously unsafe behavior like oopes. This fixes this by using cdev_alloc to put the cdev on the heap. That way, we can simply allocate a new one in hidg_bind.
A vulnerability in the Linux kernel's USB gadget function for HID devices can lead to a use-after-free issue. When the device is unbound and then re-bound, the character device is reinitialized, potentially while there are still active references to it. This can occur if the /dev/hidg* device is open, creating an unsafe situation that could lead to a crash. The vulnerability affects several versions of the Linux kernel.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/5a229016ca3ac551294ec59770be9da94ec4bf63 | kernel.org | Patch |
| https://git.kernel.org/stable/c/75ecc46828ec377dd5692c677168ef6d64fd7123 | kernel.org | Patch |
| https://git.kernel.org/stable/c/81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d | kernel.org | Patch |
| https://git.kernel.org/stable/c/c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43 | kernel.org | Patch |
| https://git.kernel.org/stable/c/eb6ef6185f2054a341ec70d7e2165f5381744215 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 3.19, < 6.12.83 >= 6.13, < 6.18.24 >= 6.19, < 6.19.14 >= 7.0, < 7.0.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Apr 29, 2026 | Initial Analysis | [email protected] |
| Apr 27, 2026 | CVE Modified | kernel.org |
| Apr 24, 2026 | New CVE Received | kernel.org |