CVE-2022-49995 Details
Description
In the Linux kernel, the following vulnerability has been resolved: writeback: avoid use-after-free after removing device When a disk is removed, bdi_unregister gets called to stop further writeback and wait for associated delayed work to complete. However, wb_inode_writeback_end() may schedule bandwidth estimation dwork after this has completed, which can result in the timer attempting to access the just freed bdi_writeback. Fix this by checking if the bdi_writeback is alive, similar to when scheduling writeback work. Since this requires wb->work_lock, and wb_inode_writeback_end() may get called from interrupt, switch wb->work_lock to an irqsafe lock.
A use-after-free vulnerability has been identified in the Linux kernel's writeback process after a disk is removed. When a disk is disconnected, the function bdi_unregister is called to halt further writeback and allow associated delayed work to finish. However, the function wb_inode_writeback_end() might schedule bandwidth estimation work after this process is complete, leading to a situation where a timer tries to access a freed bdi_writeback structure. This vulnerability has been addressed by ensuring that the bdi_writeback is still active before scheduling writeback tasks, similar to the existing procedure. Additionally, the writeback structure's work lock has been changed to an interrupt-safe lock to prevent potential issues when wb_inode_writeback_end() is called from an interrupt context.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7 | kernel.org | Patch |
| https://git.kernel.org/stable/c/f87904c075515f3e1d8f4a7115869d3b914674fd | kernel.org | Patch |
| https://git.kernel.org/stable/c/f96b9f7c1676923bce871e728bb49c0dfa5013cc | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.15, < 5.15.64 >= 5.16, < 5.19.6 6.0 rc1 6.0 rc2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 4, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 14, 2025 | Initial Analysis | [email protected] |
| Jun 18, 2025 | New CVE Received | kernel.org |