PoC Monitor
← All CVEs
CVE-2025-21879published 27 Mar 2025 14:57 UTCData: JSON · API

Linux

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

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.8high · scored by CISA ADP · CWE-416
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

Linux Linux
  • >= fef55c4d9c9c22264d2b2ceae1e26922cb6129a5, < 07836bc18f4ae42da4e922244f4685561c18755e
  • >= 1020443840569535f6025a855958f07ea3eebf71, < 5e79d26014f9386387575b9ed60d342057cee49b
  • >= 1020443840569535f6025a855958f07ea3eebf71, < 59f37036bb7ab3d554c24abc856aabca01126414

Fixed in 07836bc18f4ae42da4e922244f4685561c18755e, 5e79d26014f9386387575b9ed60d342057cee49b, 59f37036bb7ab3d554c24abc856aabca01126414

Linux Linux
  • 6.13

Fixed in 0, 6.13.6, 6.14

Mitigation

Upgrade Linux to 07836bc18f4ae42da4e922244f4685561c18755e or 5e79d26014f9386387575b9ed60d342057cee49b or 59f37036bb7ab3d554c24abc856aabca01126414 or later.

Upgrade Linux to 0 or 6.13.6 or 6.14 or later.

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published27 Mar 2025 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.