CVE-2025-21879
published high CVSS 3.1 · 7.8btrfs: fix use-after-free on inode when scanning root during em shrinking
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxfef55c4d9c9c22264d2b2ceae1e26922cb6129a5 to < 07836bc18f4ae42da4e922244f4685561c18755e · 1020443840569535f6025a855958f07ea3eebf71 to < 5e79d26014f9386387575b9ed60d342057cee49b · 1020443840569535f6025a855958f07ea3eebf71 to < 59f37036bb7ab3d554c24abc856aabca01126414 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.13 (affected) · 0 to < 6.13 (unaffected · semver) · 6.13.6 through 6.13.* (unaffected · semver) · 6.14 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Oracle Linux | 10 | kernel-uekaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uekx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Oracle Linux | 10 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-usbaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-usbx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-toolsaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek-toolsx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64kaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-develaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modulesaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-desktopaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-extraaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-usbaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 10 | kernel-uek64k-modules-wirelessaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el10uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uekaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uekx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
| Oracle Linux | 9 | kernel-uek-modules-usbaarch64 | Advisory build | 0:6.12.0-103.40.4.1.el9uek | ELSA-2025-20551 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerable `btrfs_extent_map_shrinker_worker` is reached only through the superblock shrinker (`btrfs_free_cached_objects()` → `btrfs_free_extent_maps()`) on a locally mounted btrfs filesystem, so the attacker must be able to generate local file I/O and memory pressure. No remote protocol data is parsed on this path. AC:L - The attacker drives both sides of the race — memory pressure queues the em shrinker work while concurrent unlink/subvolume-delete churn keeps the cleaner kthread active — and `btrfs_add_delayed_iput()` itself calls `wake_up_process(fs_info->cleaner_kthread)` immediately before the dangling dereference, so no attacker-uncontrollable timing is needed. Every inode the shrinker scans is a fresh attempt and the workload can be repeated indefinitely. PR:L - Any unprivileged local user with write access to a btrfs filesystem (the default root fs on Fedora, openSUSE, SteamOS and many NAS/appliance images, and common for container overlay storage) can populate extent maps and drive reclaim; there is no capability check, LSM gate, or admin-only ioctl anywhere on the path. UI:N - The attacker's own filesystem activity and memory-pressure workload trigger the shrinker worker and the cleaner kthread; no victim needs to mount, open, or otherwise interact with anything. S:U - The use-after-free occurs in a kernel workqueue worker against kernel slab memory within the same security authority as the vulnerable kernel; no VM, IOMMU, or sandbox boundary is crossed. C:H - This is a CWE-416 use-after-free where the freed `btrfs_inode` slab object is dereferenced as a pointer chain (`inode->root->fs_info`); an attacker who grooms `btrfs_inode_cachep` via concurrent inode allocation controls the contents at that offset, turning the dereference into a read at an attacker-influenced kernel address, and UAF windows on a dedicated inode cache are a well-established primitive for kernel memory disclosure. I:H - Use-after-free on a live slab object gives the attacker a dangling reference into memory that is concurrently reallocated and written by other inodes, which combined with heap grooming is the standard basis for corrupting adjacent kernel state and hijacking control flow. Scored high per the memory-corruption guidance rather than limited to the immediate observed symptom. A:H - Reading `inode->root` from the reallocated object commonly yields NULL (set by `btrfs_alloc_inode()`, and guaranteed under `init_on_free=1`) or garbage, producing a kernel oops in the em shrinker worker; with KASAN enabled it is a slab-use-after-free splat that panics under `panic_on_warn`.
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.8 | high | CISA-ADP · adp | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | fef55c4d9c9c22264d2b2ceae1e26922cb6129a5 to < 07836bc18f4ae42da4e922244f4685561c18755e (affected · git)1020443840569535f6025a855958f07ea3eebf71 to < 5e79d26014f9386387575b9ed60d342057cee49b (affected · git)1020443840569535f6025a855958f07ea3eebf71 to < 59f37036bb7ab3d554c24abc856aabca01126414 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.13 (affected)0 to < 6.13 (unaffected · semver)6.13.6 through 6.13.* (unaffected · semver)6.14 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
1- CWE-416 CWE-416 Use After Free
References
3Provider assertions
2Linux · cna
btrfs: fix use-after-free on inode when scanning root during em shrinking
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- bdb5423d4736d37f100bd38f9dc0dadc588ad7a4d93cf9f5af7191973c59f1b7
- Ingested
- 23 Sep 2026, 08:39:46 UTC
- Source record
- Official CVE record