CVE-2022-49995

writeback: avoid use-after-free after removing device

HIGH
7.8
CVSS Score
Published: June 18, 2025 at 11:00 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.15 ≤ v < 5.15.645.15 ≤ v < 5.19.65.15 ≤ v < 6.05.16 ≤ v < 5.19.645a2966fd64147518dc5bca25f447bd0fb5359ac6.0 rc16.0 rc2
Vendor states this is fixed in 9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7 (fixed)
Vendor states this is fixed in f87904c075515f3e1d8f4a7115869d3b914674fd (fixed)
Vendor states this is fixed in f96b9f7c1676923bce871e728bb49c0dfa5013cc (fixed)
Vendor states this is fixed in 5.15 (unaffected)
Vendor states this is fixed in 5.15.64 (unaffected)
Vendor states this is fixed in 5.19.6 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9a6c710f3bc10bc9cc23e1c080b53245b7f9d5b7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f87904c075515f3e1d8f4a7115869d3b914674fd
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f96b9f7c1676923bce871e728bb49c0dfa5013cc

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card