{"id":"CVE-2025-21786","summary":"workqueue: Put the pwq after detaching the rescuer from the pool","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nworkqueue: Put the pwq after detaching the rescuer from the pool\n\nThe commit 68f83057b913(\"workqueue: Reap workers via kthread_stop() and\nremove detach_completion\") adds code to reap the normal workers but\nmistakenly does not handle the rescuer and also removes the code waiting\nfor the rescuer in put_unbound_pool(), which caused a use-after-free bug\nreported by Cheung Wall.\n\nTo avoid the use-after-free bug, the pool’s reference must be held until\nthe detachment is complete. Therefore, move the code that puts the pwq\nafter detaching the rescuer from the pool.","modified":"2026-04-02T12:45:13.853462Z","published":"2025-02-27T02:18:26.406Z","related":["ALSA-2025:20095","ALSA-2025:20518","USN-7521-2"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21786.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/835b69c868f53f959d4986bbecd561ba6f38e492"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e76946110137703c16423baf6ee177b751a34b7e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e7c16028a424dd35be1064a68fa318be4359310f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21786.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21786"},{"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":"68f83057b913467a999e1bf9e0da6a119668f769"},{"fixed":"e7c16028a424dd35be1064a68fa318be4359310f"},{"fixed":"835b69c868f53f959d4986bbecd561ba6f38e492"},{"fixed":"e76946110137703c16423baf6ee177b751a34b7e"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21786.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}