RefluXFS Vulnerability in Linux Kernel XFS Filesystem Enables Local Root Escalation via Stale Mapping Race Condition

The cybersecurity landscape has been jolted by the disclosure of a critical local privilege escalation vulnerability within the Linux kernel’s XFS filesystem implementation, a flaw that researchers have dubbed RefluXFS. Tracked as CVE-2026-64600, the vulnerability allows an unprivileged local user to overwrite files owned by the root user, effectively granting a pathway to persistent and full administrative control over an affected system. Disclosed on July 22, the flaw is particularly concerning due to its presence in default installations of several major enterprise-grade Linux distributions, including Red Hat Enterprise Linux (RHEL), Fedora Server, and Amazon Linux.
The vulnerability resides in the way the XFS filesystem handles "reflinks"—a storage-saving feature that allows multiple files to share the same physical data blocks on a disk. According to a detailed technical advisory from Qualys, the security firm credited with the discovery, the flaw is a classic "check-then-use" race condition occurring at the block layer of the operating system. By exploiting a narrow window of time during a lock cycle, an attacker can trick the kernel into writing data intended for a user-owned file directly into a protected system file, such as the password database or a sensitive system binary.
The Technical Mechanics of RefluXFS
To understand the RefluXFS vulnerability, one must first examine the architecture of the XFS filesystem’s reflink and copy-on-write (CoW) mechanisms. Reflinking allows for near-instantaneous cloning of files by sharing existing data blocks rather than duplicating them. When one of the shared files is modified, the filesystem performs a copy-on-write operation, allocating a new block for the modified data to ensure the other file remains unchanged.
The flaw, identified as a stale mapping error, occurs within the kernel functions xfs_reflink_fill_cow_hole() and xfs_reflink_fill_delalloc(). When an attacker initiates a clone of a root-owned file using the FICLONE ioctl—which requires only read access—the kernel creates a scratch file that initially shares the same physical disk blocks as the source. The attacker then attempts to write to this clone using O_DIRECT, a flag that instructs the system to bypass the page cache and perform I/O operations directly to the storage device.

During this process, the kernel must read the data-fork mapping under an internal inode lock (ILOCK). However, to reserve transaction space for the upcoming write, the kernel briefly releases and then reacquires this lock. In the microsecond-scale gap when the lock is released, a second concurrent writer can complete a copy-on-write operation, remapping the cloned file to a new block. When the first writer reacquires the lock, it fails to realize that the block addresses it previously captured are now "stale."
Because the kernel continues to use the old, now-incorrect block address, the data intended for the attacker’s file is written into the physical block still owned by the original, protected root file. Crucially, because this write occurs at the block layer and bypasses the target file’s inode entirely, the file’s metadata—including its ownership, permissions, timestamps, and setuid bits—remains completely unaltered. This allows an attacker to modify a binary like /usr/bin/chsh or the /etc/passwd file without triggering traditional integrity checks or leaving obvious forensic trails in the filesystem metadata.
Scope of Exposure and Affected Distributions
The RefluXFS vulnerability is not universal across all Linux installations but is highly prevalent in environments where XFS is the default or preferred filesystem. For an exploitation to be successful, three specific conditions must be met: the system must be running a kernel version between 4.11 and the current patched releases, the XFS filesystem must have the reflink feature enabled, and an attacker must have local execution privileges.
Qualys has confirmed that default installations of Red Hat Enterprise Linux (RHEL) versions 8, 9, and 10 meet these criteria. Other derivatives in the RHEL ecosystem, such as CentOS Stream, AlmaLinux, Rocky Linux, Oracle Linux, and CloudLinux, are similarly exposed. Fedora Server (version 31 and later) and Amazon Linux (specifically Amazon Linux 2023 and certain Amazon Linux 2 images from late 2022 onward) also ship with configurations that are vulnerable out of the box.
In contrast, distributions such as Debian, Ubuntu, SLES, and openSUSE are generally considered less at risk by default, as they typically utilize the ext4 or Btrfs filesystems for root partitions. However, these systems remain vulnerable if a system administrator manually opted for XFS with reflinks during the installation process. Users can verify their status by executing the command xfs_info / | grep reflink=; a result of reflink=1 indicates that the filesystem is susceptible to the race condition.

The Role of Artificial Intelligence in Discovery
One of the most significant aspects of the RefluXFS disclosure is the methodology used to find it. Qualys revealed that the vulnerability was located with the assistance of an advanced AI model, specifically Anthropic’s Claude Mythos Preview. Researchers directed the model to analyze the Linux kernel source code with the specific goal of finding race conditions similar to the infamous "Dirty COW" vulnerability of 2016.
The AI model not only identified the specific lock-cycle failure in the XFS drivers but also assisted in drafting a functional proof-of-concept exploit and the initial technical advisory. This marks a milestone in the evolution of vulnerability research, demonstrating that frontier AI models are becoming capable of identifying complex, deep-seated logic errors in low-level systems code that have evaded manual audits and automated fuzzing for years. The bug itself dates back to 2017, meaning it remained hidden in the Linux kernel for nearly a decade before the AI-driven analysis brought it to light.
Chronology of Disclosure and Patching
the timeline of RefluXFS illustrates a highly coordinated effort between security researchers and Linux vendors to mitigate the risk before public disclosure.
- July 10, 2024: Red Hat’s internal bug tracker auto-imported a report initially describing the issue as potential data corruption within XFS reflinking.
- July 14, 2024: Red Hat began issuing early kernel advisories (RHSA) for RHEL 8 and RHEL 10 streams, quietly pushing fixes to customers under the guise of stability and data integrity updates.
- July 16, 2024: The official fix was merged into the upstream Linux kernel. The patch, authored by senior kernel maintainers, introduced a sequence counter (
i_df.if_seq) to track changes in the data fork. If the counter moves while the ILOCK is dropped, the kernel now re-reads the mapping, closing the race window. - July 17, 2024: Patching extended to SAP and extended-support streams for enterprise users.
- July 22, 2024: Coordinated public disclosure. Qualys released its full technical analysis, and the vulnerability was assigned CVE-2026-64600.
- July 23, 2024: Major community distributions, including Debian and various RHEL rebuilds, updated their security trackers to reflect the availability of patched kernels.
Implications for Enterprise and Cloud Security
The implications of RefluXFS are profound, particularly for multi-tenant environments and cloud service providers. In scenarios where multiple users share a single physical host—such as shared hosting, CI/CD pipelines, or containerized environments—the ability for a single unprivileged user to gain root access poses a catastrophic risk to the isolation of the entire system.
Qualys noted that traditional security boundaries, such as SELinux in "Enforcing" mode, seccomp filters, and kernel lockdown modes, were unable to prevent the exploitation in their testing. Because the exploit does not rely on memory corruption, hardware-level protections like Kernel Address Space Layout Randomization (KASLR) or Supervisor Mode Execution Protection (SMEP) are irrelevant. The attack operates entirely within the logical flow of the filesystem’s block management.

Furthermore, the stealthy nature of the overwrite is a major concern for forensic teams. Since the modification bypasses the target inode, there are no "last modified" timestamp updates, and no kernel warnings are generated. An attacker could modify a setuid binary to include a backdoor, use it to gain root, and then revert the changes, leaving virtually no evidence on the disk that the binary was ever tampered with.
Remediation and Best Practices
There is no known configuration change or runtime mitigation that can disable the vulnerable XFS reflink behavior without reformatting the filesystem. Consequently, the only effective remediation is the application of the latest kernel security updates followed by a full system reboot.
System administrators are urged to prioritize patching for any system where untrusted code is executed locally. This includes development servers, public-facing web servers with shell access, and nodes within a container cluster. After updating the kernel packages, administrators should verify the running kernel version using uname -r to ensure the fix is active.
The emergence of RefluXFS serves as a stark reminder of the persistent complexities inherent in filesystem design and the critical importance of atomicity in kernel operations. As AI tools continue to mature, it is likely that more "stale" bugs from the depths of the Linux kernel will be unearthed, necessitating a proactive and rapid approach to patch management across the global IT infrastructure. Red Hat and Qualys continue to monitor the situation, though as of late July, no instances of RefluXFS being exploited in the wild have been reported. Owners of affected systems are advised to act immediately to close this decade-old window of opportunity for local attackers.







