HIGH Public PoC Introduced in 4.11
RefluXFS
CVE-2026-64600
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.3MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: xfs: resample the data fork mapping after cycling ILOCK xfs_reflink_fill_{cow_hole,delalloc} are both presented with an inode, a data fork mapping, and a cow fork mapping. Unfortunately, these two helpers cycle the ILOCK to grab a transaction, which means that the mappings are stale as soon as we reacquire the ILOCK. Currently we refresh the cow fork mapping by re-calling xfs_find_trim_cow_extent, but we don't refresh the data fork mapping beforehand, which means that the xfs_bmap_trim_cow in that function queries the refcount btree about the wrong physical blocks and returns an inaccurate value in *shared. If *shared is now false, the directio write proceeds with a stale data fork mapping. Fix this by querying the data fork mapping if the sequence counter changes across the ILOCK cycle.
02KernelScan AI Analysis
Risk summary
A race condition in XFS reflink copy-on-write handling allows a local attacker with write access to a reflinked file to cause the kernel to operate on stale data fork mappings after cycling the ILOCK. This leads to incorrect refcount btree queries, causing direct I/O writes to target incorrect physical blocks. The result is potential corruption of filesystem data integrity (writes to freed or reallocated blocks) or kernel crash.
Vulnerability analysis
The root cause is that xfs_reflink_fill_cow_hole and xfs_reflink_fill_delalloc cycle the ILOCK to obtain a transaction, but only refresh the cow fork mapping afterward, not the data fork mapping. A racing O_DIRECT writer under IOLOCK_SHARED can complete a full CoW cycle (including xfs_reflink_end_cow) while the ILOCK is dropped, remapping the offset and dropping the refcount of the old shared block. When the ILOCK is reacquired, the stale data fork mapping causes xfs_bmap_trim_cow to query the refcount btree about wrong physical blocks, returning an inaccurate *shared value. If *shared is now false, the directio write proceeds with the stale mapping, issuing attacker-controlled I/O to physical blocks that are no longer valid for the file. This can corrupt other files if those blocks have been reallocated, or cause filesystem metadata inconsistency and kernel panic. The fix samples the data fork sequence counter (if_seq) before dropping the ILOCK and re-reads the data fork mapping via xfs_bmapi_read if the sequence changed, ensuring both the shared-status recheck and the caller's in-place iomap operate on current data.
Exploit availability
KernelScan found public exploit code for this CVE. Open it in the CVE browser to see what we found, where, and how strong the evidence is — that needs a free account with a confirmed email address.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| mainline | 4.11 | 7.2-rc4 | 2f4acd0fcd86 |
| 7.1 | 4.11 | 7.1.4 | 44f891bc0889 |
| 6.1 | 4.11 | 6.1.178 | b8c9aa832b52 |
| 5.15 | 4.11 | 5.15.212 | dc11be133efc |
| 6.12 | 4.11 | 6.12.96 | e705d81a7193 |
| 6.18 | 4.11 | 6.18.39 | 206c09b04dc5 |
| 6.6 | 4.11 | 6.6.145 | 50f0012da104 |