CVE-2025-21879: btrfs: fix use-after-free on inode when scanning root during em shrinking

Published Mar 27, 2025
·
Updated

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

btrfs: fix use-after-free on inode when scanning root during em shrinking

At btrfsscanroot() we are accessing the inode's root (and fsinfo) in a call to btrfsfsclosing() after we have scheduled the inode for a delayed iput, and that can result in a use-after-free on the inode in case the cleaner kthread does the iput before we dereference the inode in the call to btrfsfsclosing().

Fix this by using the fsinfo stored already in a local variable instead of doing inode->root->fsinfo.

Affected Software

6 affected components
Linux Foundation Linux Kernel
Linux Linux kernel>=6.13<6.13.6
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
Linux Linux kernel=6.14-rc4

Event History

Mar 27, 2025
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-21879?

CVE-2025-21879 has not been assigned a specific CVSS score yet, but it is considered a critical vulnerability due to the potential for a use-after-free condition.

2

How do I fix CVE-2025-21879?

To fix CVE-2025-21879, upgrade to a patched version of the Linux kernel that addresses this vulnerability.

3

What versions of Linux Kernel are affected by CVE-2025-21879?

CVE-2025-21879 affects Linux Kernel versions from 6.13 up to 6.14-rc4.

4

What are the symptoms of CVE-2025-21879 exploitation?

Exploitation of CVE-2025-21879 may lead to system instability, crashes, or unauthorized access due to the use-after-free error.

5

Is there a workaround for CVE-2025-21879?

There is no known workaround for CVE-2025-21879; upgrading the kernel is the recommended solution.

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