CVE-2022-49995

Source
https://cve.org/CVERecord?id=CVE-2022-49995
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49995.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49995
Downstream
Related
Published
2025-06-18T11:00:55Z
Modified
2026-08-12T03:51:31Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
writeback: avoid use-after-free after removing device
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49995.json"
}
References

Affected packages

Git / 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"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.15.0
Fixed
5.15.64
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.19.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49995.json"