USB Gadget RNDIS Vulnerability in Linux Kernel
Summary
GSD-2022-1000908: usb: gadget: rndis: add spinlock for rndis response list. Affects Kernel versions >= f6281af9d62e128aa6efad29cf7265062af114f2, < 9f688aadede6b862a0a898792b1a35421c93636f. 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 Linux Kernel is the core component of the Linux operating system, responsible for managing system resources and providing essential services. It includes various subsystems, including USB gadget drivers, which enable devices to act as USB peripherals. One such driver is the RNDIS (Remote Network Driver Interface Specification) gadget driver, which allows a Linux device to emulate a network interface and communicate with a host computer over USB.
The vulnerability in the RNDIS gadget driver arises from a lack of proper synchronization when handling the response list. Without a spinlock, concurrent access to the response list can lead to race conditions and potential memory corruption.
Vulnerability Detail
The vulnerability in the RNDIS gadget driver allows for potential memory corruption due to race conditions when accessing the response list. An attacker with physical access to a vulnerable Linux device could exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition.
The vulnerability was introduced in Linux Kernel version 4.6 by commit f6281af9d62e128aa6efad29cf7265062af114f2 and was fixed in version 4.19.232 by commit 9f688aadede6b862a0a898792b1a35421c93636f. It is crucial for affected systems to update to a patched version of the Linux Kernel to mitigate the risk.
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, it is possible to disable the RNDIS gadget driver if it is not required for the system's functionality. This can be achieved by blacklisting the 'g_ether' module or removing it from the kernel configuration. However, this workaround may impact the functionality of USB networking on the affected device.
Conclusion
The USB Gadget RNDIS vulnerability in the Linux Kernel exposes systems to potential memory corruption and arbitrary code execution. It is crucial for affected systems to update to a patched version of the Linux Kernel to mitigate the risk. Additionally, disabling the RNDIS gadget driver can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability could allow an attacker with physical access to a vulnerable Linux device to execute arbitrary code or cause a denial-of-service condition.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will provide real-time alerts for open-source vulnerabilities.
At the time of this report, there is no known public exploit for this vulnerability. However, it is important to apply the necessary updates to mitigate the risk.
No, this vulnerability requires physical access to the affected Linux device to exploit it.
The primary mitigation is to update the Linux Kernel to a patched version. Additionally, disabling the RNDIS gadget driver can serve as a temporary workaround, although it may impact USB networking functionality.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.