CVE-2026-99779 in Linuxinfo

Summary

by MITRE • 11/20/2026

In the Linux kernel, the following vulnerability has been resolved:

net/9p/usbg: call disable_usb9pfs() from usb9pfs_disable()

usb9pfs_disable() is the usb_function ->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.

usb9pfs_disable() never called disable_usb9pfs(), so the IN/OUT endpoints and their usb_request objects were left active and allocated across a host-driven disable. When the host later reconfigures the device, enable_usb9pfs() calls alloc_requests() again and unconditionally overwrites usb9pfs->in_req/out_req, permanently leaking the previous allocations, while the endpoints themselves are left enabled underneath the function's own idea of being disabled.

Call disable_usb9pfs() before reinit_completion(&usb9pfs->send), mirroring the same sequence already used in p9_usbg_close(). Placing it before the reinit_completion() also ensures usb_ep_disable() 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.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/20/2026

The vulnerability identified within the Linux kernel's 9p over USB subsystem stems from an improper implementation of the gadget function disable callback, specifically regarding resource cleanup and state management during host-driven disconnection events. In the composite gadget framework, when a host resets or unconfigures a device, it invokes the usb_function->disable callback to signal that the peripheral should cease operations. This mechanism is critical for ensuring that all associated endpoints are disabled and any pending I/O requests are properly terminated before the function driver considers itself inactive. The specific flaw resides in the usb9pfs_disable() function, which failed to invoke disable_usb9pfs(), thereby neglecting to deactivate the IN and OUT endpoints or free the allocated usb_request objects. This deviation from standard practice among other in-tree function drivers creates a significant discrepancy between the kernel's internal state of the gadget function and its actual operational status on the hardware level.

The consequences of this oversight are twofold, involving both memory integrity issues and potential race conditions that compromise system stability. When the host subsequently reconfigures the device to enable services again, the initialization routine calls alloc_requests() to prepare for new data transfers. Because the previous usb_request objects were not freed during the disable phase, they remain allocated in memory but are no longer referenced by the driver's active structures. The subsequent unconditional overwrite of the usb9pfs->in_req and out_req pointers results in a permanent memory leak, as references to these previously allocated request blocks are lost without being released back to the kernel pool. Over time, repeated connect-disconnect cycles can lead to significant resource exhaustion, potentially degrading system performance or causing allocation failures for other critical subsystems.

Beyond simple resource leakage, the failure to properly disable endpoints introduces a dangerous race condition related to hardware state synchronization. The usb_ep_disable() function is responsible for flushing any requests still queued in the USB controller's hardware buffers. By omitting this call during the disable phase, pending I/O operations may remain active or partially processed even after the driver believes it has stopped handling traffic. When the completion mechanism is reset via reinit_completion(), there is a risk that stale completions from previous transactions could trigger unexpected behavior in subsequent sessions. The corrected implementation addresses this by ensuring that disable_usb9pfs() is called prior to resetting the completion semaphore, thereby guaranteeing that usb_ep_disable() has synchronously flushed all queued requests before the driver transitions into its new operational state. This alignment with the sequence used in p9_usbg_close ensures a clean slate for subsequent interactions and prevents data corruption or undefined behavior arising from stale hardware states.

From a classification perspective, this vulnerability aligns with CWE-401, which describes missing release of memory after successful allocation, leading to resource leaks that can degrade system availability over time. Additionally, the improper handling of asynchronous I/O requests and completion mechanisms relates to CWE-362, indicating concurrent execution issues where race conditions may lead to unexpected results or security bypasses if an attacker could manipulate timing between disable and re-enable cycles. In terms of adversarial tactics, this flaw does not directly facilitate privilege escalation but represents a weakness in resource management that could be leveraged for denial-of-service attacks through sustained connection cycling. The ATT&CK framework categorizes such issues under techniques involving system resource exhaustion or improper cleanup, which attackers might exploit to destabilize the target environment without requiring direct code execution privileges.

Mitigation of this vulnerability requires applying the kernel patch that corrects the usb9pfs_disable() function to properly invoke disable_usb9pfs(). This ensures that endpoints are disabled and requests are freed in accordance with the composite gadget API specifications. System administrators should update their Linux kernels to versions where this fix is included, particularly those running environments utilizing 9p over USB functionality for virtualization or file sharing purposes. Furthermore, developers implementing custom USB function drivers must adhere strictly to the requirement of disabling endpoints and freeing resources within the disable callback to prevent similar leaks in other subsystems. Regular auditing of gadget driver implementations against standard patterns can help identify and rectify such discrepancies before they impact production systems.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00187

KEV

no

Activities

very low

Sources