CVE-2021-39685: Linux USB Gadget Buffer overflows
Summary
CVE-2021-39685: In various setup methods of the USB gadget subsystem, there is a possible out of bounds write due to an incorrect flag check. Affects :linux_kernel: versions >= :0, < :2022-03-05. Fixed in :2022-03-05. How to fix ↓
Also tracked for
- linux · Debian:11
The same CVE-2021-39685 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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 USB Gadget subsystem is responsible for enabling USB device functionality on Linux systems. It allows the system to act as a USB device, providing various functionalities such as file transfer, network connectivity, and emulation of USB devices. This vulnerability affects the USB gadget subsystem in the Linux kernel, specifically in various setup methods. The vulnerability arises due to an incorrect flag check, leading to a possible out-of-bounds write. Exploiting this vulnerability could result in local privilege escalation without requiring additional execution privileges. It is important to note that user interaction is not necessary for exploitation.
Vulnerability Detail
The vulnerability in the Linux USB Gadget subsystem arises from an incorrect flag check in various setup methods. This flaw allows an attacker to perform an out-of-bounds write, potentially leading to local privilege escalation. By exploiting this vulnerability, an attacker could gain elevated privileges on the affected system. The impact of this vulnerability is significant as it could allow an attacker to execute arbitrary code or access sensitive information. It is crucial to apply the necessary fixes to mitigate the risk of exploitation.
How To Fix
Minimum fixed version
:2022-03-05
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The Linux USB Gadget subsystem is vulnerable to buffer overflows due to an incorrect flag check in various setup methods. This vulnerability could allow an attacker to escalate their privileges on the affected system without requiring additional execution privileges. It is crucial to update the Linux kernel with the provided fixes to mitigate the risk of exploitation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for :linux_kernel: →
FAQ
The Linux USB Gadget subsystem enables a Linux system to act as a USB device, providing various functionalities such as file transfer, network connectivity, and emulation of USB devices.
This vulnerability allows for local privilege escalation, potentially enabling an attacker to execute arbitrary code or access sensitive information on the affected system.
No, user interaction is not needed for exploitation of this vulnerability.
To fix this vulnerability, it is recommended to update the Linux kernel to a version that includes the necessary patches provided by the Android ecosystem.
The fixes for this vulnerability can be obtained from the Android source repositories. Links to the specific fixes are provided in the 'how_to_fix' section of this report.
References
Related vulnerabilities
Recent vulnerabilities recorded for :linux_kernel:.