CVE-2026-43327: USB: dummy-hcd: Fix locking/synchronization error
In the Linux kernel, the following vulnerability has been resolved:
USB: dummy-hcd: Fix locking/synchronization error
Syzbot testing was able to provoke an addressing exception and crash in the usbgadgetudcreset() routine in drivers/usb/gadgets/udc/core.c, resulting from the fact that the routine was called with a second ("driver") argument of NULL. The bad caller was setlinkstate() in dummyhcd.c, and the problem arose because of a race between a USB reset and driver unbind.
These sorts of races were not supposed to be possible; commit 7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous synchronization change"), along with a few followup commits, was written specifically to prevent them. As it turns out, there are (at least) two errors remaining in the code. Another patch will address the second error; this one is concerned with the first.
The error responsible for the syzbot crash occurred because the stopactivity() routine will sometimes drop and then re-acquire the dum->lock spinlock. A call to stopactivity() occurs in setlinkstate() when handling an emulated USB reset, after the test of dum->intsenabled and before the increment of dum->callbackusage. This allowed another thread (doing a driver unbind) to sneak in and grab the spinlock, and then clear dum->intsenabled and dum->driver. Normally this other thread would have to wait for dum->callbackusage to go down to 0 before it would clear dum->driver, but in this case it didn't have to wait since dum->callbackusage had not yet been incremented.
The fix is to increment dum->callbackusage before calling stopactivity() instead of after. Then the thread doing the unbind will not clear dum->driver until after the call to usbgadgetudcreset() safely returns and dum->callbackusage has been decremented again.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43327?
The severity of CVE-2026-43327 has not been publicly rated, but it involves a locking/synchronization error in the Linux kernel that may lead to potential crashes.
How do I fix CVE-2026-43327?
To fix CVE-2026-43327, update to the latest version of the Linux kernel where the vulnerability has been resolved.
What does CVE-2026-43327 affect?
CVE-2026-43327 affects the USB dummy-hcd component of the Linux kernel.
What is the impact of CVE-2026-43327?
The impact of CVE-2026-43327 includes potential crashes in the usb_gadget_udc_reset() routine.”},{