Vulnerability in Kernel package: usb: dwc2: check return value after calling platform_get_resource()

Kernel Updated 02 Oct 2025

Summary

19/10/2021
N/A
No i
Unrated
Not published

GSD-2021-1001527: usb: dwc2: check return value after calling platform_get_resource(). Affects Kernel versions < 4b7f4a0eb92bf37bea4cd838c7f83ea42823ca8b. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Kernel package is an integral part of the Linux operating system, responsible for managing the core functionalities and communication between hardware and software components. It provides essential services and drivers for various devices, including USB controllers. The dwc2 driver within the Kernel package handles the functionality of DesignWare USB 2.0 Controller. This vulnerability specifically affects the dwc2 driver's handling of platform resources.

Vulnerability Detail

The vulnerability arises from a lack of proper error handling in the dwc2 driver's code when calling the platform_get_resource() function. By not checking the return value of this function, potential errors or resource allocation failures are not appropriately handled. This oversight could lead to various security issues, such as resource conflicts, memory corruption, or denial-of-service attacks. Exploiting this vulnerability could allow an attacker to gain unauthorized access, manipulate data, or disrupt the normal operation of the USB controller.

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 workaround, developers can manually check the return value of platform_get_resource() and handle any potential errors or failures. Here is an example of how this can be done in C code:

struct resource *res;
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (!res) {
  // Handle error or failure
}

By explicitly checking the return value, developers can implement their own error handling logic to mitigate the vulnerability.

Conclusion

In conclusion, the Kernel package's dwc2 driver is vulnerable to a security issue arising from the lack of proper error handling when calling platform_get_resource(). This vulnerability can have severe consequences, including unauthorized access, data manipulation, and system disruptions. It is crucial to update the Kernel package to version v4.14.250 or later to mitigate this vulnerability. Additionally, developers can implement the provided workaround to add an extra layer of protection. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability could potentially allow an attacker to exploit the USB controller, gaining unauthorized access, manipulating data, or causing disruptions in the system's operation.

Yes, systems using versions of the Linux Kernel prior to v4.14.250 are affected by this vulnerability. It is recommended to update to the latest version to mitigate the risk.

There are no known instances of this vulnerability being exploited in the wild. However, it is crucial to apply the necessary updates and fixes to ensure the security of your system.

This vulnerability can potentially be exploited remotely if the attacker has network access to the affected system. It is important to update the Kernel package to the latest version to prevent any remote exploitation attempts.

Besides updating the Kernel package, developers can implement the provided workaround by manually checking the return value of platform_get_resource() and handling any potential errors or failures.

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