CVE-2025-21786: workqueue: Put the pwq after detaching the rescuer from the pool
In the Linux kernel, the following vulnerability has been resolved:
workqueue: Put the pwq after detaching the rescuer from the pool
The commit 68f83057b913("workqueue: Reap workers via kthreadstop() and remove detachcompletion") adds code to reap the normal workers but mistakenly does not handle the rescuer and also removes the code waiting for the rescuer in putunboundpool(), which caused a use-after-free bug reported by Cheung Wall.
To avoid the use-after-free bug, the pool’s reference must be held until the detachment is complete. Therefore, move the code that puts the pwq after detaching the rescuer from the pool.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch 68f83057b913
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21786?
The severity of CVE-2025-21786 is categorized as medium, highlighting a potential impact on system stability.
What systems are affected by CVE-2025-21786?
CVE-2025-21786 affects the Linux kernel, specifically versions prior to the fix implemented in the related commits.
How do I fix CVE-2025-21786?
To fix CVE-2025-21786, update your Linux kernel to the latest version that contains the necessary patches.
What mitigation strategies exist for CVE-2025-21786?
Mitigation strategies for CVE-2025-21786 include applying kernel patches and avoiding the use of affected kernel configurations.
Was there a patch released for CVE-2025-21786?
Yes, patches for CVE-2025-21786 were released in the kernel commits that address the vulnerability.