CVE-2026-98975: xfs: stop exchanging reflink flags when exchanging mappings

Published Oct 23, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

xfs: stop exchanging reflink flags when exchanging mappings

When an exchange covers both files from offset 0 to idisksize, xmicanexchangereflinkflags() assumes every mapping moved and hands the reflink flag over to the other file.

That assumption is wrong. A file can still own shared blocks past idisksize, e.g. after EXCHANGERANGETOEOF sets a smaller size without unmapping anything. The flag is cleared anyway, and the next write to such a block happens in place instead of CoW, corrupting the other file that shares it.

Commit a23eca88448e ("xfs: fix exchange-range reflink flag clearing issue with INO1WRITTEN") fixed one instance of this. Rather than add another special case, stop moving the flags. xfsexchmapsensurereflink() already sets the flag on both inodes before the exchange, so both just keep it.

Nothing sets CLEARINO{1,2}REFLINK anymore. Intents logged by older kernels may still carry them; recovery already masks them off, so they stay in the log format mask and are ignored.

XFSIOCSWAPEXT has the same problem: it moves the reflink flag from one inode to the other along with the extents. Just removing that is not enough here: the exchange path flags both inodes up front in xfsexchmapsensurereflink(), but swapext has no such step, so the inode receiving the shared extents would be left without the flag. Set it on both inodes instead, and make sure both have a CoW fork, since an inode with the reflink flag is expected to have one.

The flag now stays until FALLOCFLUNSHARERANGE, xfsscrub, or a truncate to zero removes it.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 23, 2026
CVE Published
via MITRE·12:19 PM
Data Sourced
via MITRE·12:19 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203