USB: core: Fix hang in usb_kill_urb by adding memory barriers
Summary
GSD-2022-1000123: USB: core: Fix hang in usb_kill_urb by adding memory barriers. Affects Kernel versions < 5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b. 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 USB core is a fundamental component of the Linux Kernel that handles USB device communication. It provides the necessary infrastructure for managing USB devices, including device enumeration, driver binding, and data transfer. USB devices are widely used in various systems, ranging from personal computers to embedded devices. However, the USB core is susceptible to vulnerabilities that can lead to system instability or compromise.
Vulnerability Detail
The vulnerability identified as GSD-2022-1000123 in the USB core of the Linux Kernel can cause a hang in the usb_kill_urb function. This issue arises due to the lack of memory barriers, which can result in incorrect ordering of memory operations. An attacker could potentially exploit this vulnerability to cause a denial-of-service (DoS) condition or execute arbitrary code with elevated privileges. The impact and attack plausibility of this vulnerability have not been proven yet.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v4.19.228 or later. The fix for this issue was implemented in commit 5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b. Updating the Kernel to the latest stable release ensures that the necessary memory barriers are added to the usb_kill_urb function, preventing the hang and potential exploitation.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can apply the patch provided in commit 5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b manually. Here is an example of the patch:
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -1235,6 +1235,7 @@ static void usb_kill_urb(struct urb *urb)
urb->status = -ENOENT;
if (usb_urb_dir_in(urb))
usb_hcd_unlink_urb_from_ep(hcd, urb);
+ smp_mb();
complete(&urb->complete);
}
}
Conclusion
The USB core vulnerability in the Linux Kernel, identified as GSD-2022-1000123, can lead to a hang in the usb_kill_urb function. It is recommended to update the Kernel to version v4.19.228 or later to fix this vulnerability. A patch is available for manual application as a workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The USB core in the Linux Kernel is responsible for managing USB devices, including device enumeration, driver binding, and data transfer. It provides the necessary infrastructure for USB device communication.
The impact of this vulnerability is not yet proven, but it could potentially lead to a denial-of-service (DoS) condition or allow an attacker to execute arbitrary code with elevated privileges.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v4.19.228 or later. The fix was implemented in commit 5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b.
Yes, a workaround is available. Users can manually apply the patch provided in commit 5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b to address the vulnerability.
For more information about this vulnerability, you can refer to the source link: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1000xxx/GSD-2022-1000123.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.