CVE-2025-21838

usb: gadget: core: flush gadget workqueue after device removal

MEDIUM
5.5
CVSS Score
Published: March 7, 2025 at 09:09 AM UTC
Updated: October 15, 2026 at 02:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: core: flush gadget workqueue after device removal device_del() can lead to new work being scheduled in gadget->work workqueue. This is observed, for example, with the dwc3 driver with the following call stack: device_del() gadget_unbind_driver() usb_gadget_disconnect_locked() dwc3_gadget_pullup() dwc3_gadget_soft_disconnect() usb_gadget_set_state() schedule_work(&gadget->work) Move flush_work() after device_del() to ensure the workqueue is cleaned up.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.12 ≤ v < 6.1.1306.13 ≤ v < 6.13.46.2 ≤ v < 6.6.806.7 ≤ v < 6.12.163.125702f75375aa9ecf8ad3431aef3fe6ce8c8dbd156.146.14 rc16.14 rc2
Vendor states this is fixed in 399a45e5237ca14037120b1b895bd38a3b4492ea (fixed)
Vendor states this is fixed in 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7 (fixed)
Vendor states this is fixed in 97695b5a1b5467a4f91194db12160f56da445dfe (fixed)
Vendor states this is fixed in e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266 (fixed)
Vendor states this is fixed in f894448f3904d7ad66fecef8f01fe0172629e091 (fixed)
Vendor states this is fixed in 3.12 (unaffected)
Vendor states this is fixed in 6.1.130 (unaffected)
Vendor states this is fixed in 6.12.16 (unaffected)
Vendor states this is fixed in 6.13.4 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)
Vendor states this is fixed in 6.6.80 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/399a45e5237ca14037120b1b895bd38a3b4492ea
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/859cb45aefa6de823b2fa7f229fe6d9562c9f3b7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/97695b5a1b5467a4f91194db12160f56da445dfe
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f894448f3904d7ad66fecef8f01fe0172629e091
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
Source: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
https://cert-portal.siemens.com/productcert/html/ssa-784472.html

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card