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-97546 Overview
CVE-2026-97546 is a denial-of-service vulnerability in the Linux kernel's XFS filesystem repair subsystem. The flaw resides in the xrep_dir_recover_data function, which is responsible for salvaging directory entries during online repair operations. When the salvage routine encounters an unused directory entry (dirent) that reports a length of zero, the function enters an infinite loop because it cannot advance past the malformed record. A zero-length active entry triggers the same condition. The issue was identified by LOLLM and resolved through upstream patches to the XFS codebase.
Critical Impact
An unprivileged user or malicious filesystem image can cause a kernel thread to spin indefinitely during XFS directory repair, resulting in CPU exhaustion and denial of service.
Affected Products
- Linux kernel versions containing the XFS online repair (scrub/repair) feature
- Stable kernel branches prior to the fix commits 08754eb, 5442f0c, 9f84792, and a455c83
- Distributions shipping affected upstream stable kernels with XFS repair enabled
Discovery Timeline
- 2026-09-25 - CVE-2026-97546 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97546
Vulnerability Analysis
The vulnerability lives in the XFS online repair subsystem, specifically in xrep_dir_recover_data. This function walks a directory data block to salvage valid dirents when the parent directory has been corrupted. The loop that iterates across the block relies on each dirent's declared length to advance the read cursor to the next record.
When the routine encounters a dirent whose length field is zero, the cursor does not advance. The loop re-reads the same offset indefinitely, consuming an entire CPU core and preventing the repair operation from completing. The same defect affects zero-length active entries that follow the unused-entry code path.
Because XFS repair can be triggered against user-supplied or attacker-controlled block devices, including loopback-mounted filesystem images, the condition is reachable without privileged access on systems that allow mounting untrusted media.
Root Cause
The root cause is missing input validation on the length field of directory entries during salvage. The repair code trusts the on-disk length value when computing the next record offset. A length of zero causes the iterator to make no forward progress, which satisfies the loop continuation condition on every pass. This is an infinite loop denial-of-service pattern caused by improper validation of a length field read from untrusted on-disk data.
Attack Vector
An attacker with the ability to supply a crafted XFS filesystem image, for example by convincing a user to mount removable media or by exploiting an environment that auto-mounts attached devices, can trigger the condition when online repair runs. The result is a kernel thread pinned at 100% CPU and stalled repair I/O. The vulnerability does not produce memory corruption or privilege escalation; the impact is limited to availability. The fix adds explicit checks that reject zero-length unused and active entries, allowing the salvage code to abort cleanly instead of looping. See the upstream fixes in Kernel Git Commit 08754eb, Kernel Git Commit 5442f0c, Kernel Git Commit 9f84792, and Kernel Git Commit a455c83.
Detection Methods for CVE-2026-97546
Indicators of Compromise
- A kernel worker thread or xfs_scrub process pinned at or near 100% CPU with no forward progress on repair I/O.
- Hung task warnings in dmesg referencing xrep_dir_recover_data or related XFS repair functions.
- Soft lockup messages (watchdog: BUG: soft lockup) tied to XFS kernel threads during scrub or repair operations.
Detection Strategies
- Monitor kernel ring buffer output for XFS repair stack traces and soft lockup warnings on hosts running vulnerable kernels.
- Correlate xfs_scrub invocations with sustained high CPU on kernel threads to identify stalled repair sessions.
- Audit mount events for XFS filesystems originating from removable or user-controlled block devices.
Monitoring Recommendations
- Enable persistent kernel log collection and alert on hung_task_timeout_secs events referencing XFS modules.
- Track per-process CPU time for kernel workers and xfs_scrub to detect long-running salvage operations that fail to complete.
- Review storage subsystem metrics for stalled I/O queues on XFS volumes undergoing repair.
How to Mitigate CVE-2026-97546
Immediate Actions Required
- Upgrade affected systems to a Linux kernel version that includes the fix commits 08754eb, 5442f0c, 9f84792, or a455c83 on the appropriate stable branch.
- Restrict mounting of XFS filesystems from untrusted or user-controlled sources until patched kernels are deployed.
- Suspend scheduled xfs_scrub runs on systems that cannot be patched immediately if those systems may encounter untrusted directory data.
Patch Information
The upstream fix validates dirent length fields in xrep_dir_recover_data and rejects zero-length unused and active entries. Patches are available in the kernel.org stable tree at Kernel Git Commit 08754eb, Kernel Git Commit 5442f0c, Kernel Git Commit 9f84792, and Kernel Git Commit a455c83. Apply the distribution kernel update that incorporates these commits.
Workarounds
- Disable the XFS online repair feature on hosts that do not require it until the kernel can be updated.
- Enforce administrative controls that prevent mounting XFS images from untrusted sources, including blocking automount of removable media.
- Isolate storage servers that run periodic xfs_scrub jobs so that only trusted filesystems are processed.
# Verify running kernel version against fixed stable releases
uname -r
# Check whether XFS online repair is in use
systemctl list-timers | grep -i xfs_scrub
# Temporarily disable scheduled XFS scrub timers until patched
sudo systemctl disable --now xfs_scrub_all.timer
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

