CVE-2026-99783 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

net/9p/usbg: Fix use-after-free in disable_usb9pfs()

disable_usb9pfs() frees the IN and OUT usb_request objects before it disables the corresponding endpoints. If either request is still queued, the later usb_ep_disable() call cancels the endpoint queue and the UDC driver can still access the already freed request.

With dummy_hcd and KASAN, this is reproducible by queueing the OUT request and then disconnecting the configfs gadget:

BUG: KASAN: slab-use-after-free in dummy_disable+0x2b4/0x300 Read of size 8 at addr ffff888009702400 by task sh/1 usb_ep_disable+0x8e/0x1f0 usb9pfs_func_unbind+0x193/0x350 gadget_dev_desc_UDC_store+0x135/0x280

dummy_free_request() also warns because the request is freed while its queue entry is still linked.

Disable both endpoints before freeing the request objects. This lets usb_ep_disable() cancel any queued transfers and invoke the completion callback while the request storage is still valid. The request objects are then freed only after they have been removed from the endpoint queues.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel vulnerability identified in net/9p/usbg represents a critical use-after-free condition within the USB gadget filesystem implementation, specifically affecting the disable_usb9pfs function. This flaw arises from an incorrect sequence of operations during resource teardown. The original code path attempts to free the IN and OUT usb_request objects before disabling the corresponding USB endpoints. In asynchronous I/O models typical of Linux kernel drivers, request structures often remain queued on endpoint queues until they are explicitly completed or cancelled by the driver stack. By releasing memory associated with these requests prematurely, the system creates a window where the underlying storage is invalid while still being referenced by active data structures within the USB device controller subsystem.

The operational impact manifests when either of these usb_request objects remains queued at the time of disconnection or endpoint disablement. When the subsequent call to usb_ep_disable occurs, it triggers the cancellation of any pending transfers on that endpoint. This process involves accessing the request structure to invoke completion callbacks and update internal state. Because the memory has already been freed by the earlier step in disable_usb9pfs, this access constitutes a use-after-free error. Under debugging configurations such as Kernel Address Sanitizer (KASAN) or when using specific hardware emulators like dummy_hcd, this results in immediate kernel crashes or data corruption due to reads from invalid slab addresses. The warning generated by dummy_free_request further confirms that the request object was deallocated while its queue entry remained linked, violating memory safety constraints inherent to robust driver design.

From a classification perspective, this vulnerability aligns with CWE-416, Use After Free, which describes situations where software continues to use a pointer after it has been freed, leading to undefined behavior. The attack vector typically involves triggering the gadget unbind process, often through configfs interactions that simulate device disconnection or configuration changes. This maps closely to ATT&CK technique T1059, Command and Scripting Interpreter, if an attacker can manipulate system configurations via exposed interfaces, although in this specific kernel context, it is more accurately viewed as a local privilege escalation vector resulting from memory corruption rather than direct command execution. The vulnerability allows for potential denial of service through kernel panic or, depending on the exact memory layout and exploitation techniques, arbitrary code execution by overwriting freed slab metadata.

The remediation strategy involves reordering the cleanup sequence to ensure memory safety during resource deallocation. Specifically, both endpoints must be disabled before any attempt is made to free the associated request objects. This adjustment ensures that usb_ep_disable has the opportunity to cancel queued transfers and invoke necessary completion callbacks while the request storage remains valid in memory. Only after these requests have been fully removed from their respective endpoint queues should they be freed. This approach guarantees that no dangling references exist when memory is reclaimed, thereby eliminating the race condition between queue cancellation and memory release. Implementing this fix requires careful synchronization to ensure all pending I/O operations are settled before proceeding with deallocation, maintaining the integrity of the USB gadget subsystem during teardown phases.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00187

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!