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-97547 Overview
CVE-2026-97547 affects the XFS filesystem in the Linux kernel. The vulnerability resides in the exchange-range operation, specifically in xmi_can_exchange_reflink_flags(). When XFS_EXCHMAPS_INO1_WRITTEN is set, the kernel can incorrectly move the reflink inode flag between files that still hold shared written extents. Subsequent writes then take the non-reflink path and can modify blocks that should remain protected by copy-on-write (CoW). The result is silent data corruption between reflink-related files.
Critical Impact
Silent on-disk data corruption across reflink-related files on XFS when exchange-range operations are performed with the INO1_WRITTEN flag.
Affected Products
- Linux kernel (XFS filesystem subsystem)
- Distributions shipping affected XFS exchange-range code paths
- Workloads using reflink and FIEXCHANGE_RANGE operations on XFS
Discovery Timeline
- 2026-09-25 - CVE-2026-97547 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97547
Vulnerability Analysis
The XFS exchange-range operation allows two inodes to swap file content ranges atomically. The helper xmi_can_exchange_reflink_flags() decides whether the reflink inode flag can migrate from one inode to the other. The decision assumes the full file contents, including every shared extent, will be exchanged between the two inodes.
That assumption breaks when XFS_EXCHMAPS_INO1_WRITTEN is requested. In that mode, xfs_exchmaps_can_skip_mapping() may skip hole and unwritten mappings in file1. The exchange then completes without moving every mapping that the earlier flag-swap decision depended on. Cleanup can clear the reflink flag from an inode that still owns shared written extents.
Once the flag is cleared, later writes to that inode follow the non-reflink write path. Those writes update blocks in place rather than performing CoW, breaking the sharing invariant and corrupting data visible to the peer file.
Root Cause
The root cause is an inconsistent assumption between two code paths. xmi_can_exchange_reflink_flags() assumes every shared extent is exchanged, while xfs_exchmaps_can_skip_mapping() is allowed to skip holes and unwritten mappings when INO1_WRITTEN is set. The flag ownership state and the actual on-disk extent state diverge.
Attack Vector
This is a local filesystem data-integrity flaw, not a remote code execution path. Triggering it requires the ability to issue an exchange-range ioctl against two files on an XFS filesystem with reflink enabled, with the INO1_WRITTEN option in effect. The flaw manifests as corruption rather than privilege escalation.
The fix disables the reflink flag exchange whenever XFS_EXCHMAPS_INO1_WRITTEN is requested. The content exchange still proceeds, and both inodes conservatively keep the reflink flag until the standard reflink flag cleanup path removes it. Patch references: commits 56f87ac, 8ae30b9, a23eca8, and fac32b9.
Detection Methods for CVE-2026-97547
Indicators of Compromise
- Unexpected content divergence between files that previously shared extents via reflink or cp --reflink
- xfs_bmap or xfs_io fiemap output showing shared extents on an inode whose reflink flag has been cleared
- Checksum mismatches on files restored from reflink-based snapshots after exchange-range operations
Detection Strategies
- Audit kernel versions across Linux fleets and compare against the fixed commits 56f87ac, 8ae30b9, a23eca8, and fac32b9
- Monitor for userspace callers of the FIEXCHANGE_RANGE ioctl on XFS volumes, particularly utilities performing atomic file updates
- Validate file integrity on reflink-heavy workloads such as container image stores, VM disk pools, and database snapshots
Monitoring Recommendations
- Collect kernel version telemetry from Linux endpoints and servers to identify unpatched XFS hosts
- Enable auditd rules on ioctl syscalls targeting XFS mounts to track exchange-range usage
- Run periodic xfs_repair -n and reflink-aware integrity checks on filesystems hosting shared-extent workloads
How to Mitigate CVE-2026-97547
Immediate Actions Required
- Apply the stable kernel updates containing commits 56f87ac, 8ae30b9, a23eca8, and fac32b9 through your distribution's package manager
- Inventory systems running XFS with reflink enabled and prioritize patching for hosts that use exchange-range workflows
- Validate backups of reflink-related files before patching, in case existing corruption needs recovery
Patch Information
The fix is upstream in the Linux kernel stable tree. See Kernel Git Commit 56f87ac, Kernel Git Commit 8ae30b9, Kernel Git Commit a23eca8, and Kernel Git Commit fac32b9. The patch disables the reflink flag exchange whenever XFS_EXCHMAPS_INO1_WRITTEN is requested, leaving the regular reflink flag cleanup path to drop the flag later.
Workarounds
- Avoid using exchange-range ioctls with the INO1_WRITTEN option on XFS until the kernel is patched
- Restrict userspace tools that invoke FIEXCHANGE_RANGE on reflink-enabled XFS volumes
- Temporarily disable reflink-based workflows on affected hosts if patch deployment is delayed
# Verify kernel version on an XFS host
uname -r
# Check whether XFS filesystems have reflink enabled
xfs_info /path/to/mount | grep reflink
# Apply distribution kernel update (example: Debian/Ubuntu)
sudo apt update && sudo apt install --only-upgrade linux-image-generic
sudo reboot
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

