{"id":"CVE-2025-21838","summary":"usb: gadget: core: flush gadget workqueue after device removal","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: core: flush gadget workqueue after device removal\n\ndevice_del() can lead to new work being scheduled in gadget-\u003ework\nworkqueue. This is observed, for example, with the dwc3 driver with the\nfollowing call stack:\n  device_del()\n    gadget_unbind_driver()\n      usb_gadget_disconnect_locked()\n        dwc3_gadget_pullup()\n\t  dwc3_gadget_soft_disconnect()\n\t    usb_gadget_set_state()\n\t      schedule_work(&gadget-\u003ework)\n\nMove flush_work() after device_del() to ensure the workqueue is cleaned\nup.","modified":"2026-04-02T12:45:14.742008Z","published":"2025-03-07T09:09:57.515Z","related":["MGASA-2025-0111","MGASA-2025-0112","SUSE-SU-2025:01919-1","SUSE-SU-2025:1177-1","SUSE-SU-2025:1178-1","SUSE-SU-2025:1180-1","SUSE-SU-2025:20190-1","SUSE-SU-2025:20192-1","SUSE-SU-2025:20260-1","SUSE-SU-2025:20270-1","USN-7521-2"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21838.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/399a45e5237ca14037120b1b895bd38a3b4492ea"},{"type":"WEB","url":"https://git.kernel.org/stable/c/859cb45aefa6de823b2fa7f229fe6d9562c9f3b7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/97695b5a1b5467a4f91194db12160f56da445dfe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f894448f3904d7ad66fecef8f01fe0172629e091"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21838.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21838"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15"},{"fixed":"e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266"},{"fixed":"859cb45aefa6de823b2fa7f229fe6d9562c9f3b7"},{"fixed":"f894448f3904d7ad66fecef8f01fe0172629e091"},{"fixed":"97695b5a1b5467a4f91194db12160f56da445dfe"},{"fixed":"399a45e5237ca14037120b1b895bd38a3b4492ea"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21838.json"}}],"schema_version":"1.7.5"}