CVE-2026-99779: net/9p/usbg: call disable_usb9pfs() from usb9pfs_disable()
In the Linux kernel, the following vulnerability has been resolved:
net/9p/usbg: call disableusb9pfs() from usb9pfsdisable()
usb9pfsdisable() is the usbfunction ->disable callback, invoked by the composite gadget core whenever the host resets or unconfigures the gadget. The gadget function API requires this callback to disable its endpoints; every other in-tree function driver does so from its ->disable hook.
usb9pfsdisable() never called disableusb9pfs(), so the IN/OUT endpoints and their usbrequest objects were left active and allocated across a host-driven disable. When the host later reconfigures the device, enableusb9pfs() calls allocrequests() again and unconditionally overwrites usb9pfs->inreq/outreq, permanently leaking the previous allocations, while the endpoints themselves are left enabled underneath the function's own idea of being disabled.
Call disableusb9pfs() before reinitcompletion(&usb9pfs->send), mirroring the same sequence already used in p9usbgclose(). Placing it before the reinitcompletion() also ensures usbepdisable() has synchronously flushed any requests still queued in hardware before the completion is reset, closing the same race that motivated resetting the completion here in the first place.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 7.3.5-1 - Compensating control
In net/9p/usbg, call disable_usb9pfs() from usb9pfs_disable() before reinit_completion(&usb9pfs->send).
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel's USB gadget 9P filesystem function (net/9p/usbg) are exposed when a USB host can reset or unconfigure that gadget and later reconfigure it. The issue is in the gadget function's disable path rather than ordinary 9P use alone.
What host interaction triggers the vulnerable behavior?
A USB host must reset or unconfigure the gadget, causing the composite gadget core to invoke usb9pfs_disable(), and later reconfigure the device. On reconfiguration, new request objects are allocated while the prior requests may remain allocated and endpoints may remain enabled.
What happens if the system cannot be patched immediately?
The provided information identifies the trigger as host-driven reset, unconfiguration, and reconfiguration of the USB 9P gadget. Avoiding use of that gadget function, or preventing those host-driven transitions where operationally possible, avoids the described path.
How can an affected condition be recognized?
The described condition leaves USB 9P gadget IN/OUT endpoints active and prior usb_request allocations retained after a host-driven disable. Subsequent gadget reconfiguration causes alloc_requests() to overwrite the stored in_req/out_req pointers, leaking the previous allocations.