Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98244 Overview
CVE-2026-98244 is a Linux kernel vulnerability in the Btrfs filesystem's free space tree rebuild logic. The function btrfs_rebuild_free_space_tree() sets the BTRFS_FS_CREATING_FREE_SPACE_TREE flag before rebuilding the free space tree. Several error paths return without clearing this flag. The transaction restart failure path can leave the flag set on a live filesystem, which causes delayed reference processing to be skipped. The resulting state corruption can affect filesystem consistency during normal operation after a failed rebuild.
Critical Impact
A failed free space tree rebuild leaves a stale state flag active on a mounted filesystem, causing the kernel to skip delayed reference processing and leaving the free space tree untrusted.
Affected Products
- Linux kernel (Btrfs filesystem subsystem)
- Stable kernel branches referenced by upstream fix commits 3565893c, a32bedab, and b1df2997
- Distributions shipping affected Btrfs code prior to the backported fix
Discovery Timeline
- 2026-10-06 - CVE-2026-98244 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98244
Vulnerability Analysis
The Btrfs free space tree is an on-disk structure that tracks free extents inside block groups. During a rebuild, the kernel sets BTRFS_FS_CREATING_FREE_SPACE_TREE on the filesystem info structure to signal that the tree is being reconstructed. Code paths that process delayed references consult this flag and skip work that would otherwise interact with an incomplete tree.
The defect lies in error handling. If the rebuild fails because of a transaction restart or other mid-operation error, the function returns without clearing the flag. The filesystem remains mounted and operational, yet the kernel continues to behave as if a rebuild is in progress. Delayed reference processing is suppressed, which can lead to incorrect accounting of extent usage over time.
The upstream fix clears BTRFS_FS_CREATING_FREE_SPACE_TREE on every rebuild failure path. It keeps BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED set so callers fall back to extent-tree caching rather than relying on the partially rebuilt structure.
Root Cause
The root cause is incomplete cleanup in error paths of btrfs_rebuild_free_space_tree(). The flag that gates delayed reference processing is set before the rebuild and never cleared when the rebuild aborts. This is a state management defect in filesystem code, not a memory safety issue.
Attack Vector
Triggering the condition requires a Btrfs free space tree rebuild that fails mid-operation. This typically occurs during mount with the space_cache=v2 option after prior inconsistency, or during administrative operations that force a rebuild. The vulnerability is a local reliability and data-integrity issue rather than a remote attack surface. Any workload that drives block group allocation on an affected filesystem after a failed rebuild can expose the inconsistency.
The vulnerability is described in prose because no verified public exploit code exists. Refer to the upstream commits for the exact code changes.
Detection Methods for CVE-2026-98244
Indicators of Compromise
- Kernel log entries from Btrfs indicating a failed free space tree rebuild or transaction restart during mount
- Filesystems reporting space_cache=v2 with persistent fallback to extent-tree caching after a rebuild attempt
- Unexpected growth or inconsistency in block group accounting on long-running Btrfs volumes
Detection Strategies
- Audit running kernel versions against the fix commits 3565893c, a32bedab, and b1df2997 on affected stable branches
- Monitor dmesg and journalctl -k for Btrfs rebuild warnings, transaction abort messages, and references to BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED
- Correlate mount events for Btrfs volumes with subsequent allocation errors or filesystem inconsistency reports
Monitoring Recommendations
- Collect kernel logs centrally and alert on Btrfs error strings tied to free space tree rebuilds
- Track kernel package versions across the fleet to confirm patch coverage on Btrfs-enabled hosts
- Baseline Btrfs filesystem health using btrfs scrub and btrfs check --readonly on scheduled maintenance windows
How to Mitigate CVE-2026-98244
Immediate Actions Required
- Apply the stable kernel update that includes the referenced Btrfs patch commits
- Reboot affected systems after kernel upgrade so the fixed Btrfs module is loaded
- Review recent kernel logs for prior failed rebuilds and plan filesystem verification on impacted volumes
Patch Information
The fix clears BTRFS_FS_CREATING_FREE_SPACE_TREE on all rebuild failure paths while retaining BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED so callers fall back to extent-tree caching. See the upstream commits for the exact changes: Linux Kernel Commit 3565893, Linux Kernel Commit a32bedab, and Linux Kernel Commit b1df2997. Apply the vendor kernel package that incorporates these commits.
Workarounds
- If patching is deferred, avoid operations that trigger free space tree rebuilds, including administrative rebuild commands on production volumes
- Remount affected Btrfs filesystems without space_cache=v2 where feasible to rely on extent-tree caching
- Schedule maintenance to unmount and verify any Btrfs volume that logged a failed rebuild before resuming heavy allocation workloads
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

