Skip to main content
Vulnerability Database/CVE-2026-97542

CVE-2026-97542: Linux Kernel XFS Bitmap Error Vulnerability

CVE-2026-97542 is a bitmap error handling flaw in the Linux kernel XFS filesystem that causes unchecked errors during AGFL repair operations. This post explains its technical details, affected versions, and mitigation steps.

Published:

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-97542 Overview

CVE-2026-97542 is a Linux kernel vulnerability in the XFS filesystem's online repair subsystem. The flaw resides in the xrep_agfl_fill function, where the kernel fails to check the return value of xagb_bitmap_walk. When the internal xagb_bitmap_set call fails, the error is silently dropped and the repair routine proceeds with inconsistent in-core data structures.

The issue affects the Allocation Group Free List (AGFL) reconstruction path used by XFS online repair (xfs_scrub). Proceeding past a bitmap error can leave filesystem metadata in an inconsistent state during repair operations.

Critical Impact

Silent error suppression during XFS AGFL repair can propagate inconsistent in-core metadata, undermining the integrity guarantees of the online repair subsystem.

Affected Products

  • Linux kernel versions containing the XFS online repair AGFL fill logic prior to the fix commits
  • Distributions shipping the vulnerable XFS scrub/repair code paths
  • Systems using xfs_scrub with online repair enabled on XFS filesystems

Discovery Timeline

  • 2026-09-25 - CVE-2026-97542 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97542

Vulnerability Analysis

The vulnerability lives in the XFS online repair code path responsible for rebuilding the Allocation Group Free List. During AGFL repair, xrep_agfl_fill invokes xagb_bitmap_set through the walker helper xagb_bitmap_walk. The walker propagates per-element error codes back to the caller, but xrep_agfl_fill discards that return value.

As a result, memory allocation failures or bitmap manipulation errors inside the callback are silently ignored. The repair routine continues to populate AGFL state based on an incomplete bitmap, producing in-core metadata that no longer matches the on-disk reality the repair was meant to reconstruct.

The LOLLM static analysis tool flagged this missing error check, and the upstream fix adds the appropriate return-value validation so the repair aborts cleanly on bitmap errors.

Root Cause

The root cause is missing error propagation in a callback-driven walker pattern. xagb_bitmap_walk returns a status code when its callback (xagb_bitmap_set) fails, but the caller treats the operation as unconditionally successful. This is a classic unchecked return value defect in error-handling logic.

Attack Vector

Triggering this condition requires local interaction with the XFS online repair subsystem on a filesystem whose AGFL requires reconstruction. The attack vector is not remote, and no CWE classification or CVSS vector has been published in the available data. The practical risk is filesystem metadata inconsistency following a repair operation rather than direct code execution.

No public exploit code or proof-of-concept has been published. The vulnerability is described in the kernel commit messages at Kernel Git Commit 82a0fd3f and companion stable backports.

Detection Methods for CVE-2026-97542

Indicators of Compromise

  • Unexpected XFS filesystem inconsistencies reported by xfs_repair following prior online repair operations on the AGFL.
  • Kernel log entries referencing xrep_agfl_fill or AGFL rebuild activity without corresponding error messages where allocation pressure existed.
  • Divergence between in-core AGFL state and on-disk AGFL contents observed during post-repair verification.

Detection Strategies

  • Audit running kernel versions against the fix commits (82a0fd3f, b5309ae6, e49977bc, eaf58053) to identify unpatched hosts.
  • Correlate xfs_scrub run history with filesystem corruption events to identify systems where silent repair failures may have occurred.
  • Monitor for dmesg entries from the XFS subsystem that indicate AGFL rebuild activity under memory pressure.

Monitoring Recommendations

  • Collect kernel ring buffer messages into a centralized logging pipeline and alert on XFS repair-related events.
  • Track scheduled xfs_scrub job exit codes and surface anomalies that may indicate incomplete repair.
  • Baseline kernel versions across the Linux fleet and flag drift from patched builds.

How to Mitigate CVE-2026-97542

Immediate Actions Required

  • Update to a Linux kernel build that includes the fix commits listed in the kernel.org references.
  • Pause non-essential xfs_scrub online repair operations on unpatched systems until kernel updates are applied.
  • After patching, verify XFS filesystem consistency with offline xfs_repair where feasible.

Patch Information

The fix adds a return-value check on the xagb_bitmap_walk call inside xrep_agfl_fill, causing the repair routine to bail out when bitmap operations fail. The patch has been merged upstream and backported to stable trees. Reference the following commits: Kernel Git Commit 82a0fd3f, Kernel Git Commit b5309ae6, Kernel Git Commit e49977bc, and Kernel Git Commit eaf58053.

Workarounds

  • Disable or avoid invoking XFS online repair (xfs_scrub -r) on unpatched kernels; prefer offline xfs_repair during maintenance windows.
  • Restrict access to administrative tools that invoke XFS scrub/repair to trusted operators only.
  • Apply vendor-supplied kernel updates through standard distribution update channels as soon as they are available.
bash
# Verify running kernel version and check for the fix
uname -r
# Example: query distribution package manager for XFS userspace tooling
# Debian/Ubuntu
apt list --installed | grep -E 'linux-image|xfsprogs'
# RHEL/Fedora
rpm -qa | grep -E 'kernel|xfsprogs'

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.