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-97549 Overview
CVE-2026-97549 is a Linux kernel vulnerability in the XFS filesystem. The flaw affects the online repair subsystem when converting shortform directories to block format during a scrub-and-repair operation. The code under-reserves blocks in the transaction by assuming a shortform conversion requires one filesystem block, which is incorrect when the directory block size differs from the filesystem block size.
When the under-reservation condition is hit, the kernel triggers an assertion failure in xfs_da_grow_inode_int and can shut down the filesystem. The issue was tripped by commit 0fe77e57588b98 ("xfs: assert the reservation covers each da fork growth") and surfaced during QA runs of the XFS for-next tree.
Critical Impact
A local user running xfs_scrub against a filesystem whose directory block size exceeds the filesystem block size can trigger a kernel assertion and filesystem shutdown, resulting in denial of service.
Affected Products
- Linux kernel XFS filesystem (online repair subsystem)
- Kernels incorporating commit 0fe77e57588b98 ("xfs: assert the reservation covers each da fork growth")
- XFS configurations where the directory block size (-n size) is larger than the filesystem block size
Discovery Timeline
- 2026-09-25 - CVE-2026-97549 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97549
Vulnerability Analysis
The defect lives in the XFS online repair path for shortform directories. When xrep_dir_swap_prep prepares to convert a shortform directory to block format, it builds an xfs_da_args object and hard-codes args->total = 1. That value tells the transaction how many filesystem blocks the growth will consume.
The assumption only holds when the directory block size equals the filesystem block size. If mkfs.xfs was invoked with -n size=8192 on a 4K filesystem, the directory block spans two filesystem blocks, so args->total must be 2. On a 1K filesystem with a 4K directory block, it must be 4. The same miscalculation exists in xrep_tempexch_estimate, which also assumes a shortform conversion needs one filesystem block.
Under-reserved transactions trigger the assertion added by commit 0fe77e57588b98: ASSERT(args->total >= dp->i_nblocks - nblks) in fs/xfs/libxfs/xfs_da_btree.c at line 2387. When the assertion fires during xfs_dir2_sf_to_block, the kernel logs a WARNING and the repair transaction fails, which can escalate to a filesystem shutdown.
Root Cause
The root cause is hard-coded block reservation values in two online repair helpers (xrep_dir_swap_prep and xrep_tempexch_estimate) that ignore m_dir_geo->fsbcount. The fix routes reservation through the existing xfs_dabuf_nfsb helper, which computes the correct number of filesystem blocks for directories and extended attributes. The patch also updates xrep_xattr_swap_prep to use xfs_dabuf_nfsb so a future multi-fsblock attr implementation does not inherit the same bug.
Attack Vector
The condition requires local access and the ability to invoke xfs_scrub (typically root or a privileged service) against an XFS filesystem whose directory block size does not match the filesystem block size. There is no network attack vector, and no code execution primitive has been reported. The practical impact is a kernel warning followed by a potential filesystem shutdown. The vulnerability was observed by XFS developers during internal QA rather than through adversarial exploitation.
Detection Methods for CVE-2026-97549
Indicators of Compromise
- Kernel log entries containing XFS: Assertion failed: args->total >= dp->i_nblocks - nblks from fs/xfs/libxfs/xfs_da_btree.c
- WARNING traces in dmesg originating from assfail in the XFS module with xfs_da_grow_inode_int on the call stack
- Call stacks showing xfs_dir2_sf_to_block reached from xrep_dir_swap_prep or xrep_dir_rebuild_tree
- Unexpected XFS filesystem shutdowns coinciding with xfs_scrub runs
Detection Strategies
- Monitor dmesg and journalctl -k for XFS assertion warnings referencing xfs_da_btree.c line 2387.
- Inventory XFS mounts and compare the directory block size (xfs_info <mount> → naming section) against the filesystem block size (bsize); mismatches indicate exposure.
- Audit automated maintenance jobs that invoke xfs_scrub -a or xfs_scrub_all on affected mounts.
Monitoring Recommendations
- Forward kernel logs from Linux hosts running XFS to a centralized log store and alert on the assertion string above.
- Track filesystem shutdown events (XFS (dev): Corruption of in-memory data detected or Shutting down filesystem) and correlate with scrub activity.
- Flag kernel versions that carry commit 0fe77e57588b98 without the fix commits referenced below.
How to Mitigate CVE-2026-97549
Immediate Actions Required
- Apply the upstream XFS fix commits 4d3c0759, b8f46ca5, and b950e84a from the stable Linux kernel tree.
- Pause scheduled xfs_scrub jobs on filesystems where the directory block size exceeds the filesystem block size until kernels are patched.
- Validate running kernels against your distribution's advisory feed and schedule reboots where fixed packages are available.
Patch Information
The fix replaces the hard-coded args->total = 1 assignments with calls to the xfs_dabuf_nfsb helper, which returns the correct filesystem block count for the directory or xattr geometry. The change applies in xrep_dir_swap_prep, xrep_xattr_swap_prep, and xrep_tempexch_estimate. See Linux Kernel Commit 4d3c075, Linux Kernel Commit b8f46ca, and Linux Kernel Commit b950e84 for the authoritative patch set.
Workarounds
- Disable or defer xfs_scrub runs on XFS mounts whose directory block size differs from the filesystem block size.
- Where feasible, recreate affected filesystems with matching mkfs.xfs defaults (-n size=<bsize>) so the directory block size equals the filesystem block size.
- Restrict execution of xfs_scrub to administrators and remove it from unattended maintenance pipelines until patched kernels are deployed.
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

