Vulnerability in Kernel Package: usb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1002984: usb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback. Affects Kernel versions >= d4f1afe5e896c18ae01099a85dab5e1a198bd2a8, < 2424307cdf421ac72075a1384eae4e4199ab6457. 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 package is a critical component of the Linux operating system, responsible for managing the system's core functionality. It provides essential services and interfaces for hardware, software, and user applications. The usb: dwc3: gadget module within the Kernel package is specifically designed for USB device controller drivers. It enables the system to act as a USB gadget, allowing it to function as a peripheral device when connected to a host system. This vulnerability affects the usb: dwc3: gadget module and can potentially be exploited by an attacker.

Vulnerability Detail

The vulnerability in the usb: dwc3: gadget module arises from the use of list_for_each_entry_safe() when using giveback. This function is used to iterate over a linked list of data structures, but it can lead to a use-after-free vulnerability if not used correctly. An attacker could potentially exploit this vulnerability to execute arbitrary code or escalate privileges on a vulnerable system. The impact and attack plausibility of this vulnerability have not been proven yet.

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

There is no specific workaround mentioned for this vulnerability. It is advised to apply the recommended fix by updating the Kernel package to the latest version.

Conclusion

In conclusion, the Kernel package's usb: dwc3: gadget module is vulnerable to a use-after-free vulnerability. It is crucial to update the Kernel package to the latest version to mitigate the risk. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The Kernel package is a critical component of the Linux operating system, responsible for managing the system's core functionality.

The usb: dwc3: gadget module is a part of the Kernel package that enables the system to function as a USB gadget, allowing it to act as a peripheral device when connected to a host system.

list_for_each_entry_safe() is a function used in the Kernel package to iterate over a linked list of data structures safely.

If exploited, this vulnerability could allow an attacker to execute arbitrary code or escalate privileges on a vulnerable system.

To fix this vulnerability, it is recommended to update the Linux Kernel package to version v5.17.15 or later.

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