USB: usbfs: Don't WARN about excessively large memory allocations in Kernel

Kernel Updated 02 Oct 2025

Summary

04/06/2021
N/A
No i
Unrated
Not published

GSD-2021-1000561: USB: usbfs: Don't WARN about excessively large memory allocations. Affects Kernel versions < 9f7cb3f01a10d9064cf13b3d26fb7e7a5827d098. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Kernel is a critical component of the Linux operating system that manages the system's resources and facilitates communication between hardware and software. It provides essential functionalities such as process management, memory management, and device drivers. The USB subsystem in the Kernel allows devices to be connected and interact with the system. However, a vulnerability has been identified in the usbfs module of the Kernel, which can lead to excessive memory allocations.

Vulnerability Detail

The usbfs module in the Kernel triggers a WARN message when it encounters excessively large memory allocations. This vulnerability can be exploited by an attacker to cause a denial-of-service (DoS) condition on the system. By repeatedly requesting large memory allocations, an attacker can exhaust the available memory resources, leading to system instability or crashes. This vulnerability has the potential to impact the overall availability and reliability of the system.

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 apply a patch provided by the Kernel community. Here is an example of the patch:

--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1309,7 +1309,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps,
 							   &urb->transfer_flags))
 						goto exit;
 
-			if (urb->transfer_buffer_length > INT_MAX) {
+			if (urb->transfer_buffer_length > INT_MAX || urb->transfer_buffer_length < 0) {
 				retval = -EINVAL;
 				goto exit;
 			}

Conclusion

In conclusion, the USB: usbfs vulnerability in the Kernel can result in a denial-of-service (DoS) condition on the system. It is crucial to update the Kernel to the latest version to mitigate this vulnerability. Applying the provided workaround patch can serve as a temporary solution until the update is applied. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability can lead to a denial-of-service (DoS) condition on the system, potentially causing system instability or crashes.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) to the playground, and it will provide real-time alerts for open-source vulnerabilities, including this one.

Yes, this vulnerability has been fixed in Linux Kernel version v5.12.9 by commit 9f7cb3f01a10d9064cf13b3d26fb7e7a5827d098.

To protect your system, it is recommended to update your Kernel to the latest version available. Follow the installation instructions provided by the Kernel developers to apply the update.

Yes, a temporary workaround is to apply a patch provided by the Kernel community. The patch can be found in the 'workaround' section of this report.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback