{"id":"CVE-2022-49995","published":"2025-06-18T11:00:55Z","modified":"2026-08-05T08:57:04Z","title":"writeback: avoid use-after-free after removing device","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"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->work_lock, and wb_inode_writeback_end() may get\ncalled from interrupt, switch wb->work_lock to an irqsafe lock.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00267,"percentile":0.18988,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/f96b9f7c1676923bce871e728bb49c0dfa5013cc","tags":[]},{"url":"https://git.kernel.org/stable/c/9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7","tags":[]},{"url":"https://git.kernel.org/stable/c/f87904c075515f3e1d8f4a7115869d3b914674fd","tags":[]}],"priority":{"score":9.3,"factors":[{"name":"EPSS percentile","points":3.8},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 45a2966fd64147518dc5bca25f447bd0fb5359ac, < f96b9f7c1676923bce871e728bb49c0dfa5013cc",">= 45a2966fd64147518dc5bca25f447bd0fb5359ac, < 9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7",">= 45a2966fd64147518dc5bca25f447bd0fb5359ac, < f87904c075515f3e1d8f4a7115869d3b914674fd"]},{"vendor":"Linux","product":"Linux","versions":["5.15"]}],"euvd":{"id":"EUVD-2022-55274","exploited":false,"provenance":"source"}}