CVE-2025-21879

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

HIGH
7.8
CVSS Score
Published: March 27, 2025 at 02:57 PM UTC
Updated: August 5, 2026 at 12:44 PM 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.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free on inode when scanning root during em shrinking At btrfs_scan_root() we are accessing the inode's root (and fs_info) in a call to btrfs_fs_closing() 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 btrfs_fs_closing(). Fix this by using the fs_info stored already in a local variable instead of doing inode->root->fs_info.

Affected

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

6.13 ≤ v < 6.13.66.13 ≤ v < 6.141020443840569535f6025a855958f07ea3eebf716.14 rc16.14 rc26.14 rc36.14 rc4fef55c4d9c9c22264d2b2ceae1e26922cb6129a5
Vendor states this is fixed in 07836bc18f4ae42da4e922244f4685561c18755e (fixed)
Vendor states this is fixed in 59f37036bb7ab3d554c24abc856aabca01126414 (fixed)
Vendor states this is fixed in 5e79d26014f9386387575b9ed60d342057cee49b (fixed)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.13.6 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

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