Vulnerability in Kernel: usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL
Summary
GSD-2021-1000954: usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL. Affects Kernel versions >= e81a7018d93a7de31a3f121c9a7eecd0a5ec58b0, < 851dee5a5da56564a70290713aee665403bb0b24. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Kernel is a fundamental component of the Linux operating system that provides core functionalities and interfaces with hardware devices. It acts as a bridge between the software and the hardware, allowing applications to communicate with various system resources. The USB (Universal Serial Bus) subsystem in the Kernel enables the use of USB devices and provides support for USB controllers. One such controller is the dwc3 (DesignWare USB 3.0 Controller) gadget driver, which allows the Kernel to act as a USB device. However, a vulnerability has been identified in the dwc3 gadget driver that can lead to potential security risks.
Vulnerability Detail
The vulnerability in the dwc3 gadget driver occurs when the dwc->gadget pointer is NULL during the execution of the dwc3_gadget_exit() function. This can happen if the gadget initialization fails or if the driver is not properly configured. An attacker could exploit this vulnerability by triggering the dwc3_gadget_exit() function when dwc->gadget is NULL, leading to a NULL pointer dereference and potentially causing a system crash or other unexpected behavior. The impact and attack plausibility of this vulnerability have not been proven yet.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If updating the Kernel is not immediately feasible, a possible workaround is to disable the dwc3 gadget driver or remove the affected hardware from the system. However, these workarounds may impact the functionality of USB devices or prevent the use of certain features that rely on the dwc3 gadget driver.
Conclusion
In conclusion, a vulnerability has been identified in the dwc3 gadget driver in the Kernel, which could potentially lead to system crashes or unexpected behavior. It is recommended to update the Kernel to version v5.10.44 or later to fix this vulnerability. If immediate updating is not possible, disabling the dwc3 gadget driver or removing the affected hardware can serve as temporary measures. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability is not yet proven. However, it could potentially lead to a system crash or other unexpected behavior if exploited.
You can use tools like Vulert (https://vulert.com) to check if your system is affected by this vulnerability. Vulert uses a manifest file like package-lock.json to monitor and alert in real-time for open-source vulnerabilities in the software.
As of now, there is no known exploit for this vulnerability. However, it is important to apply the fix or update the Kernel to mitigate any potential risks.
Yes, you can disable the dwc3 gadget driver or remove the affected hardware from the system as a temporary measure. However, this may impact the functionality of USB devices or prevent the use of certain features.
You can refer to the Linux Kernel repository on GitHub (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) for more details about the fix and the vulnerability. The specific commits related to this issue are e81a7018d93a7de31a3f121c9a7eecd0a5ec58b0 (introduced) and 851dee5a5da56564a70290713aee665403bb0b24 (fix).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.