CVE-2022-49995: writeback: avoid use-after-free after removing device
In the Linux kernel, the following vulnerability has been resolved:
writeback: avoid use-after-free after removing device
When a disk is removed, bdiunregister gets called to stop further writeback and wait for associated delayed work to complete. However, wbinodewritebackend() may schedule bandwidth estimation dwork after this has completed, which can result in the timer attempting to access the just freed bdiwriteback.
Fix this by checking if the bdiwriteback is alive, similar to when scheduling writeback work.
Since this requires wb->worklock, and wbinodewritebackend() may get called from interrupt, switch wb->worklock to an irqsafe lock.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49995?
CVE-2022-49995 has been classified as a high severity vulnerability affecting the Linux kernel.
How do I fix CVE-2022-49995?
To address CVE-2022-49995, update your Linux kernel to the latest patched version provided by your distribution.
What are the potential impacts of CVE-2022-49995?
Exploiting CVE-2022-49995 may lead to a use-after-free condition, potentially allowing an attacker to execute arbitrary code.
Which versions of the Linux kernel are affected by CVE-2022-49995?
CVE-2022-49995 affects several versions of the Linux kernel prior to the release of patches addressing the vulnerability.
How was CVE-2022-49995 discovered?
CVE-2022-49995 was discovered during routine security audits and testing of the Linux kernel related to device removal processes.