{"id":"CVE-2022-49995","summary":"writeback: avoid use-after-free after removing device","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nwriteback: avoid use-after-free after removing device\n\nWhen a disk is removed, bdi_unregister gets called to stop further\nwriteback and wait for associated delayed work to complete.  However,\nwb_inode_writeback_end() may schedule bandwidth estimation dwork after\nthis has completed, which can result in the timer attempting to access the\njust freed bdi_writeback.\n\nFix this by checking if the bdi_writeback is alive, similar to when\nscheduling writeback work.\n\nSince this requires wb-\u003ework_lock, and wb_inode_writeback_end() may get\ncalled from interrupt, switch wb-\u003ework_lock to an irqsafe lock.","modified":"2026-04-03T13:14:25.539188Z","published":"2025-06-18T11:00:55.352Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02321-1","SUSE-SU-2025:02322-1","SUSE-SU-2025:02537-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49995.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f87904c075515f3e1d8f4a7115869d3b914674fd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f96b9f7c1676923bce871e728bb49c0dfa5013cc"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49995.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49995"},{"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":"45a2966fd64147518dc5bca25f447bd0fb5359ac"},{"fixed":"f96b9f7c1676923bce871e728bb49c0dfa5013cc"},{"fixed":"9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7"},{"fixed":"f87904c075515f3e1d8f4a7115869d3b914674fd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49995.json"}}],"schema_version":"1.7.5"}