CVE-2026-64345: usb: gadget: f_printer: take kref only for successful open
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: fprinter: take kref only for successful open
printeropen() returns -EBUSY when the character device is already open, but it increments dev->kref regardless of the return value. VFS does not call ->release() for a failed open, so every rejected second open permanently leaks one reference.
Move krefget() into the successful-open branch.
Affected Software
Remediation
Event History
Frequently Asked Questions
What conditions are required to trigger the reference leak?
An attacker or local process needs permission to open the f_printer character device and must attempt an additional open while that device is already open. Each rejected open returns -EBUSY but leaks one device reference.
What is the practical impact of repeated failed opens?
Repeated rejected opens permanently increase the device reference count because VFS does not invoke the release handler after a failed open. This can cause a local denial of service through resource exhaustion, reflected by the availability-only CVSS impact.
How can I tell whether a system is vulnerable?
The affected behavior is present when printer_open() increments dev->kref even when the open operation fails because the printer character device is already open. Review the kernel source or applied patch state to confirm that kref_get() is performed only in the successful-open branch.
What should be done if patching cannot happen immediately?
Limit access to the f_printer character device so untrusted local users or processes cannot repeatedly issue concurrent open requests. The provided remediation is to apply an available patch.