{"id":"CVE-2022-49995","aliases":["CVE-2022-49995"],"related":[],"kind":"vulnerability","state":"published","title":"writeback: avoid use-after-free after removing device","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: writeback: evitar el Use-After-Free tras retirar un dispositivo. Al retirar un disco, se llama a bdi_unregister para detener la escritura diferida y esperar a que se complete el trabajo retrasado asociado. Sin embargo, wb_inode_writeback_end() puede programar la estimación de ancho de banda dwork después de que esto se haya completado, lo que puede provocar que el temporizador intente acceder al bdi_writeback recién liberado. Para solucionar esto, verifique si bdi_writeback está activo, de forma similar a cuando se programa la escritura diferida. Dado que esto requiere wb-&gt;work_lock y wb_inode_writeback_end() puede ser llamado desde una interrupción, cambie wb-&gt;work_lock a un bloqueo irqsafe.","source":"nvd"}],"published":"2025-06-18T11:00:55.352Z","modified":"2026-08-05T08:57:04.391Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"45a2966fd64147518dc5bca25f447bd0fb5359ac","fixed":"f96b9f7c1676923bce871e728bb49c0dfa5013cc","status":"affected"},{"type":"git","introduced":"45a2966fd64147518dc5bca25f447bd0fb5359ac","fixed":"9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7","status":"affected"},{"type":"git","introduced":"45a2966fd64147518dc5bca25f447bd0fb5359ac","fixed":"f87904c075515f3e1d8f4a7115869d3b914674fd","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"5.15.64","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.19.6","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15","fixed":"5.15.64"},{"status":"affected","introduced":"5.16","fixed":"5.19.6"},{"status":"affected","version":"6.0"},{"status":"affected","version":"6.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/f96b9f7c1676923bce871e728bb49c0dfa5013cc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f87904c075515f3e1d8f4a7115869d3b914674fd","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49995","url":"https://www.cve.org/CVERecord?id=CVE-2022-49995","licence":"CVE Terms of Use","modified":"2026-08-05T08:57:04.391Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49995","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49995","licence":"Public domain","modified":"2026-08-04T10:18:02.403Z"}],"updatedAt":"2026-11-25T22:58:20.999Z","epss":{"score":0.00267,"percentile":0.20069,"date":"2026-12-01T12:00:22.000Z"}}