CVE-2025-21879

Source
https://cve.org/CVERecord?id=CVE-2025-21879
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21879.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-21879
Downstream
Published
2025-03-27T14:57:08.929Z
Modified
2026-07-08T08:11:59.087370222Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
btrfs: fix use-after-free on inode when scanning root during em shrinking
Details

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 btrfsfs_closing().

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21879.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fef55c4d9c9c22264d2b2ceae1e26922cb6129a5
Fixed
07836bc18f4ae42da4e922244f4685561c18755e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1020443840569535f6025a855958f07ea3eebf71
Fixed
5e79d26014f9386387575b9ed60d342057cee49b
Fixed
59f37036bb7ab3d554c24abc856aabca01126414

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21879.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21879.json"