CVE-2026-31606

Source
https://cve.org/CVERecord?id=CVE-2026-31606
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31606.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-31606
Downstream
Related
Published
2026-04-24T14:42:28.792Z
Modified
2026-06-18T03:54:35.060649825Z
Summary
usb: gadget: f_hid: don't call cdev_init while cdev in use
Details

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: fhid: don't call cdevinit 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 cdevalloc to put the cdev on the heap. That way, we can simply allocate a new one in hidgbind.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31606.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cb382536052fcc7713988869b54a81137069e5a9
Fixed
c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43
Fixed
eb6ef6185f2054a341ec70d7e2165f5381744215
Fixed
5a229016ca3ac551294ec59770be9da94ec4bf63
Fixed
75ecc46828ec377dd5692c677168ef6d64fd7123
Fixed
81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31606.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.19.0
Fixed
6.12.83
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.24
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.14
Type
ECOSYSTEM
Events
Introduced
6.20.0
Fixed
7.0.1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31606.json"