CVE-2025-21838
usb: gadget: core: flush gadget workqueue after device removal
Mitigation
- Upgrade Linux to 399a45e5237ca14037120b1b895bd38a3b4492ea or later.
Who should check
- Anyone running Linux >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < f894448f3904d7ad66fecef8f01fe0172629e091; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 97695b5a1b5467a4f91194db12160f56da445dfe; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 399a45e5237ca14037120b1b895bd38a3b4492ea
- Anyone running Linux 3.12
Vulnerability facts
- Affected
- Linux >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < f894448f3904d7ad66fecef8f01fe0172629e091; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 97695b5a1b5467a4f91194db12160f56da445dfe; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 399a45e5237ca14037120b1b895bd38a3b4492ea; Linux 3.12
- Fixed in
- Linux 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7, Linux 97695b5a1b5467a4f91194db12160f56da445dfe, Linux 399a45e5237ca14037120b1b895bd38a3b4492ea
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < f894448f3904d7ad66fecef8f01fe0172629e091; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 97695b5a1b5467a4f91194db12160f56da445dfe; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 399a45e5237ca14037120b1b895bd38a3b4492ea | — | cvelist |
| Linux | 3.12 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-21838. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-21838.md Affected: Linux >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < f894448f3904d7ad66fecef8f01fe0172629e091; >= 5702f75375aa9ecf8ad3431… Fixed in: Linux 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7, Linux 97695b5a1b5467a4f91194db12160f56da445dfe, Linux 399a45e5237ca14037120b1b895bd38a3b4492ea Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266
- https://git.kernel.org/stable/c/859cb45aefa6de823b2fa7f229fe6d9562c9f3b7
- https://git.kernel.org/stable/c/f894448f3904d7ad66fecef8f01fe0172629e091
- https://git.kernel.org/stable/c/97695b5a1b5467a4f91194db12160f56da445dfe
- https://git.kernel.org/stable/c/399a45e5237ca14037120b1b895bd38a3b4492ea
FAQ
Is CVE-2025-21838 being exploited?
There is no confirmed exploitation: CVE-2025-21838 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-21838?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-21838?
Linux >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < f894448f3904d7ad66fecef8f01fe0172629e091; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 97695b5a1b5467a4f91194db12160f56da445dfe; >= 5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15, < 399a45e5237ca14037120b1b895bd38a3b4492ea; Linux 3.12.
Is there a fix for CVE-2025-21838?
Yes. Fixed in Linux 859cb45aefa6de823b2fa7f229fe6d9562c9f3b7, Linux 97695b5a1b5467a4f91194db12160f56da445dfe, Linux 399a45e5237ca14037120b1b895bd38a3b4492ea. Upgrade Linux to 399a45e5237ca14037120b1b895bd38a3b4492ea or later.
How do I check if I'm affected by CVE-2025-21838?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.