CVE-2025-21879

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

High · published March 27, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
10.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00208 · 10.4th percentile
Published
2025-03-27T14:57Z
EPSS history
Timeline
  • 27 MAR 14:57Z
    btrfs: fix use-after-free on inode when scanning root during em shrinking
    cvelistv5