CVE-2022-49995: writeback: avoid use-after-free after removing device

Published Jun 18, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

writeback: avoid use-after-free after removing device

When a disk is removed, bdiunregister gets called to stop further writeback and wait for associated delayed work to complete. However, wbinodewritebackend() may schedule bandwidth estimation dwork after this has completed, which can result in the timer attempting to access the just freed bdiwriteback.

Fix this by checking if the bdiwriteback is alive, similar to when scheduling writeback work.

Since this requires wb->worklock, and wbinodewritebackend() may get called from interrupt, switch wb->worklock to an irqsafe lock.

Affected Software

5 affected components
Linux Foundation Linux Kernel
Linux Linux kernel>=5.15<5.15.64
Linux Linux kernel>=5.16<5.19.6
Linux Linux kernel=6.0-rc1
Linux Linux kernel=6.0-rc2

Event History

Jun 18, 2025
CVE Published
via MITRE·11:00 AM
Data Sourced
via MITRE·11:00 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·12:08 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49995?

CVE-2022-49995 has been classified as a high severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2022-49995?

To address CVE-2022-49995, update your Linux kernel to the latest patched version provided by your distribution.

3

What are the potential impacts of CVE-2022-49995?

Exploiting CVE-2022-49995 may lead to a use-after-free condition, potentially allowing an attacker to execute arbitrary code.

4

Which versions of the Linux kernel are affected by CVE-2022-49995?

CVE-2022-49995 affects several versions of the Linux kernel prior to the release of patches addressing the vulnerability.

5

How was CVE-2022-49995 discovered?

CVE-2022-49995 was discovered during routine security audits and testing of the Linux kernel related to device removal processes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203