You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
character device lifecycle
About this tag
The character device lifecycle in Linux kernel USB gadget drivers, particularly the f_hid function driver, is a critical security boundary. A vulnerability (CVE-2026-31606) arises when re-binding after an unbind reinitializes a character device that may still be in use by an open file descriptor. The fix replaces cdev_init with cdev_alloc to allow clean replacement of the device node, preventing use-after-free conditions. This tag covers discussions of proper teardown and initialization sequences for character devices in kernel drivers, emphasizing that lifecycle management must treat teardown as a security boundary to avoid exploitable race conditions.
CVE-2026-31606 is a narrow-looking Linux kernel bug with a much bigger lesson than its short description suggests: teardown must be treated as a security boundary. The issue lives in the USB gadget f_hid function driver, where re-binding after an unbind could call cdev_init on a character device...