Local privilege escalation via Btrfs log-root use-after-free
Published Feb 27, 2024 · Updated Aug 5, 2026
Use-after-free in the Btrfs log-sync path in Linux allows local users to escalate privileges or crash the host during fsync. btrfs_sync_log retains a local pointer to fs_info->log_root_tree while an aborted transaction clears and frees that tree, then dereferences the stale pointer during log synchronization. Exploitation requires local file access on a mounted Btrfs volume and a concurrent transaction abort; successful triggering can corrupt kernel memory or interrupt the entire host.
Summary
What happened
Use-after-free in the Btrfs log-sync path in Linux allows local users to escalate privileges or crash the host during fsync. btrfs_sync_log retains a local pointer to fs_info->log_root_tree while an aborted transaction clears and frees that tree, then dereferences the stale pointer during log synchronization. Exploitation requires local file access on a mounted Btrfs volume and a concurrent transaction abort; successful triggering can corrupt kernel memory or interrupt the entire host.
The record
- CVE
- CVE-2021-46958
- Published
- Feb 27, 2024
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-416, T1499.004, T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Feb 27, 2024CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=5.7
- Affected versionversion=ef67963dac255b293e19815ea3d440567be4626f <061dde8245356d8864d29e25207aa4daa0be4d3c
- Affected versionversion=ef67963dac255b293e19815ea3d440567be4626f <633f7f216663587f17601eaa1cf2ac3d5654874c
- Affected versionversion=ef67963dac255b293e19815ea3d440567be4626f <a4794be7b00b7eda4b45fffd283ab7d76df7e5d6
- Affected versionversion=ef67963dac255b293e19815ea3d440567be4626f <e2da98788369bfba1138bada72765c47989a4338
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo