CVE-2026-31606

usb: gadget: f_hid: don't call cdev_init while cdev in use

No CVSS score yet EPSS 0.16%

Published 24 Apr 2026 Updated 30 Oct 2026 CNA: Linux

Check your servers for CVE-2026-31606

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31606 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.57% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from cb382536052fcc7713988869b54a81137069e5a9, before 92f23ab86d9524bc51dae25ed916d0e69dce5992
affected from cb382536052fcc7713988869b54a81137069e5a9, before 3aa77f5da0ecb00895411f4246d8a3e4db0343c2
affected from cb382536052fcc7713988869b54a81137069e5a9, before c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43
affected from cb382536052fcc7713988869b54a81137069e5a9, before eb6ef6185f2054a341ec70d7e2165f5381744215
affected from cb382536052fcc7713988869b54a81137069e5a9, before 5a229016ca3ac551294ec59770be9da94ec4bf63
affected from cb382536052fcc7713988869b54a81137069e5a9, before 75ecc46828ec377dd5692c677168ef6d64fd7123
affected from cb382536052fcc7713988869b54a81137069e5a9, before 81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d
Other versions: unaffected
Linux
affected 3.19
unaffected before 3.19
unaffected from 6.1.191 up to and including 6.1.*
unaffected from 6.6.160 up to and including 6.6.*
unaffected from 6.12.83 up to and including 6.12.*
unaffected from 6.18.24 up to and including 6.18.*
unaffected from 6.19.14 up to and including 6.19.*
unaffected from 7.0.1 up to and including 7.0.*
unaffected 7.1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31606 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31606

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-31606
trivy image --scanners vuln IMAGE | grep CVE-2026-31606

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-31606 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.