Vulnerability in Kernel package: usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL
Summary
GSD-2021-1001030: usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL. Affects Kernel versions >= e81a7018d93a7de31a3f121c9a7eecd0a5ec58b0, < 4aad390363d2b9b3e92428dd34d27bb7ea8f1ee8. 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 package is a fundamental component of the Linux operating system that provides core functionalities and acts as an interface between hardware and software. It includes various device drivers, file systems, and other essential components. The usb: dwc3: gadget module within the Kernel package is responsible for handling USB gadget functionality. This vulnerability specifically affects the dwc3_gadget_exit() function within the module.
Vulnerability Detail
The vulnerability occurs when the dwc->gadget object is NULL in the dwc3_gadget_exit() function. This can be exploited by an attacker to cause a NULL pointer dereference, leading to a system crash or potential privilege escalation. The impact and attack plausibility of this vulnerability have not been proven yet. The vulnerability was introduced in Linux Kernel version v5.10 by commit e81a7018d93a7de31a3f121c9a7eecd0a5ec58b0 and has been fixed in version v5.12.11 by commit 4aad390363d2b9b3e92428dd34d27bb7ea8f1ee8.
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
As a temporary workaround, users can disable the affected functionality by unloading the dwc3_gadget module. This can be achieved by running the following command as root:
rmmod dwc3_gadget
Conclusion
The vulnerability in the Kernel package's usb: dwc3: gadget module can lead to a system crash or potential privilege escalation. It is crucial to update the Kernel to version v5.12.11 or later to fix this vulnerability. In the meantime, users can unload the dwc3_gadget module as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability can range from a system crash to potential privilege escalation, depending on how it is exploited.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and it will provide real-time alerts for open-source vulnerabilities.
At the time of this report, there is no known exploit for this vulnerability. However, it is important to apply the recommended fix to mitigate any potential risks.
As a temporary workaround, you can unload the dwc3_gadget module to disable the affected functionality. However, it is strongly recommended to update the Kernel to the fixed version to ensure long-term security.
You can find more information about the fix in the Linux Kernel repository. The fix was implemented in commit 4aad390363d2b9b3e92428dd34d27bb7ea8f1ee8.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.