Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A vulnerability in the Linux kernel's USB DWC2 gadget driver has been addressed. The issue arose from a spin lock and unlock mismatch in the function `dwc2_hsotg_udc_stop()`. This function called `dwc2_gadget_exit_clock_gating()` without holding the necessary lock, leading to undefined behavior by unlocking a lock that was not held and causing a deadlock when `spin_lock_irqsave()` was called later in the function. The vulnerability affected several versions of the Linux kernel.
The vulnerability could lead to a deadlock situation, where the system becomes unresponsive because a locked resource is not released, potentially causing a failure in USB gadget operations.
The vulnerability can be reproduced by invoking the `dwc2_hsotg_udc_stop()` function in the USB DWC2 gadget driver without the proper lock being held. This can be done by stopping the USB device controller while the bus is suspended, without exiting the clock gating first.
The vulnerability has been fixed by modifying the `dwc2_hsotg_udc_stop()` function to acquire the necessary lock before calling `dwc2_gadget_exit_clock_gating()` and to release it afterwards. Users should update to the latest version of the Linux kernel where this fix has been applied.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.