Linux Kernel up to 6.13.5 btrfs_scan_root use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.5 | $0-$5k | 0.00 |
Summary
A vulnerability identified as critical has been detected in Linux Kernel up to 6.13.5. Affected by this vulnerability is the function btrfs_scan_root. Performing a manipulation results in use after free.
This vulnerability was named CVE-2025-21879. The attack needs to be approached locally. There is no available exploit.
You should upgrade the affected component.
Details
A vulnerability classified as critical has been found in Linux Kernel up to 6.13.5. This affects the function btrfs_scan_root. The manipulation with an unknown input leads to a use after free vulnerability. CWE is classifying the issue as CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE 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 advisory is shared at git.kernel.org. This vulnerability is uniquely identified as CVE-2025-21879 since 12/29/2024. The exploitability is told to be easy. An attack has to be approached locally. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 12/07/2025).
Upgrading to version 6.13.6 eliminates this vulnerability. Applying the patch 5e79d26014f9386387575b9ed60d342057cee49b/59f37036bb7ab3d554c24abc856aabca01126414 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at EUVD (EUVD-2025-8487) and CERT Bund (WID-SEC-2025-0649). If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Affected
- Google Container-Optimized OS
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- SUSE openSUSE
- Dell Avamar
- Open Source Linux Kernel
- SolarWinds Security Event Manager
- Dell NetWorker
- Dell Secure Connect Gateway
Product
Type
Vendor
Name
Version
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.8VulDB Meta Temp Score: 7.5
VulDB Base Score: 7.8
VulDB Temp Score: 7.5
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍
Physical: Partially
Local: Yes
Remote: No
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 6.13.6
Patch: 5e79d26014f9386387575b9ed60d342057cee49b/59f37036bb7ab3d554c24abc856aabca01126414
Timeline
12/29/2024 🔍03/27/2025 🔍
03/27/2025 🔍
12/07/2025 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2025-21879 (🔍)
GCVE (CVE): GCVE-0-2025-21879
GCVE (VulDB): GCVE-100-301653
EUVD: 🔍
CERT Bund: WID-SEC-2025-0649 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 03/27/2025 16:23Updated: 12/07/2025 12:37
Changes: 03/27/2025 16:23 (58), 07/06/2025 12:06 (1), 07/06/2025 12:30 (1), 08/25/2025 04:48 (7), 12/07/2025 12:37 (1)
Complete: 🔍
Cache ID: 216::103
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
No comments yet. Languages: en.
Please log in to comment.