{"id":"CVE-2026-31606","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:\n\nusb: gadget: f_hid: don't call cdev_init while cdev in use\n\nWhen calling unbind, then bind again, cdev_init reinitialized the cdev,\neven though there may still be references to it. That's the case when\nthe /dev/hidg* device is still opened. This obviously unsafe behavior\nlike oopes.\n\nThis fixes this by using cdev_alloc to put the cdev on the heap. That\nway, we can simply allocate a new one in hidg_bind.","modified":"2026-06-18T03:54:35.060649825Z","published":"2026-04-24T14:42:28.792Z","related":["CGA-j9q7-wjmf-m82v","openSUSE-SU-2026:10703-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31606.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5a229016ca3ac551294ec59770be9da94ec4bf63"},{"type":"WEB","url":"https://git.kernel.org/stable/c/75ecc46828ec377dd5692c677168ef6d64fd7123"},{"type":"WEB","url":"https://git.kernel.org/stable/c/81ebd43cc0d6d106ce7b6ccbf7b5e40ca7f5503d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c6c0d13db5d0f8d465eabc14bd23d2b6a7247a43"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eb6ef6185f2054a341ec70d7e2165f5381744215"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31606.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31606"},{"type":"PACKAGE","url":"https://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"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}}],"schema_version":"1.7.5"}