{"id":"CVE-2025-21838","aliases":["CVE-2025-21838"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: core: flush gadget workqueue after device removal","summary":"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->work\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->work)\n\nMove flush_work() after device_del() to ensure the workqueue is cleaned\nup.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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->work\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->work)\n\nMove flush_work() after device_del() to ensure the workqueue is cleaned\nup.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: gadget: core: vaciar la cola de trabajo de gadget después de la eliminación del dispositivo device_del() puede provocar que se programe un nuevo trabajo en la cola de trabajo gadget-&gt;work. Esto se observa, por ejemplo, con el controlador dwc3 con la siguiente pila de llamadas: device_del() gadget_unbind_driver() usb_gadget_disconnect_locked() dwc3_gadget_pullup() dwc3_gadget_soft_disconnect() usb_gadget_set_state() schedule_work(&amp;gadget-&gt;work) Mueva flush_work() después de device_del() para garantizar que se limpie la cola de trabajo.","source":"nvd"}],"published":"2025-03-07T09:09:57.515Z","modified":"2026-11-05T21:17:43.860Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15","fixed":"e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266","status":"affected"},{"type":"git","introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15","fixed":"859cb45aefa6de823b2fa7f229fe6d9562c9f3b7","status":"affected"},{"type":"git","introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15","fixed":"f894448f3904d7ad66fecef8f01fe0172629e091","status":"affected"},{"type":"git","introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15","fixed":"97695b5a1b5467a4f91194db12160f56da445dfe","status":"affected"},{"type":"git","introduced":"5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15","fixed":"399a45e5237ca14037120b1b895bd38a3b4492ea","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.12","status":"unaffected"},{"type":"semver","introduced":"6.1.130","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.80","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.16","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.4","lastAffected":"6.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.14","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.12","fixed":"6.1.130"},{"status":"affected","introduced":"6.2","fixed":"6.6.80"},{"status":"affected","introduced":"6.7","fixed":"6.12.16"},{"status":"affected","introduced":"6.13","fixed":"6.13.4"},{"status":"affected","version":"6.14"},{"status":"affected","version":"6.14"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/e3bc1a9a67ce33a2e761e6e7b7c2afc6cb9b7266","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/859cb45aefa6de823b2fa7f229fe6d9562c9f3b7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f894448f3904d7ad66fecef8f01fe0172629e091","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/97695b5a1b5467a4f91194db12160f56da445dfe","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/399a45e5237ca14037120b1b895bd38a3b4492ea","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:35:45.618Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-21838","url":"https://www.cve.org/CVERecord?id=CVE-2025-21838","licence":"CVE Terms of Use","modified":"2026-11-05T20:41:45.440Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-21838","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21838","licence":"Public domain","modified":"2026-11-05T21:17:43.860Z"}],"updatedAt":"2026-11-25T22:58:55.046Z","epss":{"score":0.00209,"percentile":0.11654,"date":"2026-12-01T12:00:22.000Z"}}