Description
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 i_disk_size,
xmi_can_exchange_reflink_flags() 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
i_disk_size, e.g. after EXCHANGE_RANGE_TO_EOF 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 INO1_WRITTEN") fixed one instance of this. Rather than add
another special case, stop moving the flags.
xfs_exchmaps_ensure_reflink() already sets the flag on both inodes
before the exchange, so both just keep it.

Nothing sets CLEAR_INO{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.

XFS_IOC_SWAPEXT 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
xfs_exchmaps_ensure_reflink(), 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 FALLOC_FL_UNSHARE_RANGE, xfs_scrub, or a
truncate to zero removes it.
Published: 2026-10-23
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Data Corruption via Incorrect Reflink Flag Handling
Action: Apply Patch
AI Analysis

Impact

In the Linux kernel, the XFS filesystem flaw causes the reflink flag to be incorrectly transferred during mapping exchanges. When two files are exchanged, the flag that indicates shared blocks is moved in a way that leaves the receiving inode without the flag. Subsequent writes to blocks that should trigger copy‑on‑write are performed in place, corrupting data in the other file. A similar issue exists for the XFS_IOC_SWAPEXT ioctl, which moves the reflink flag without ensuring the destination inode has been prepared to use it. The result is unintended data corruption or loss in files that share blocks, undermining file integrity.

Affected Systems

The flaw is present in all Linux kernel builds that contain the XFS filesystem logic; any kernel that ships XFS is potentially vulnerable, regardless of distribution. No specific version or distribution is named in the data, so the scope is broad across all current and historic Linux kernels with XFS support.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity vulnerability, but the EPSS score of less than 1 % reflects a very low exploitation probability. The flaw does not provide a remote exploitation surface; it requires privileged local access to trigger a mapping exchange or call XFS_IOC_SWAPEXT. Because the exploitation path involves privileged operations, the risk is moderate to high for systems that rely on XFS for critical data. The absence of a KEV listing means no confirmed exploitation yet, yet the potential for data loss warrants prompt mitigation.

Generated by OpenCVE AI on October 29, 2026 at 14:16 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that incorporates the fix commit, which stops moving reflink flags during exchanges.
  • Restrict access to XFS IOCTLs that perform mapping exchanges, such as XFS_IOC_SWAPEXT, to the root user or other trusted accounts.
  • After applying the update, run XFS integrity checks (e.g., xfs_scrub or xfs_repair) to identify and correct any existing corruption from the vulnerability.

Generated by OpenCVE AI on October 29, 2026 at 14:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-9018-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9018-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
History

Thu, 29 Oct 2026 12:15:00 +0000


Sat, 24 Oct 2026 19:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-665

Sat, 24 Oct 2026 17:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-682

Sat, 24 Oct 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Fri, 23 Oct 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux

Fri, 23 Oct 2026 15:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-682

Fri, 23 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
Description 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 i_disk_size, xmi_can_exchange_reflink_flags() 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 i_disk_size, e.g. after EXCHANGE_RANGE_TO_EOF 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 INO1_WRITTEN") fixed one instance of this. Rather than add another special case, stop moving the flags. xfs_exchmaps_ensure_reflink() already sets the flag on both inodes before the exchange, so both just keep it. Nothing sets CLEAR_INO{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. XFS_IOC_SWAPEXT 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 xfs_exchmaps_ensure_reflink(), 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 FALLOC_FL_UNSHARE_RANGE, xfs_scrub, or a truncate to zero removes it.
Title xfs: stop exchanging reflink flags when exchanging mappings
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-24T14:09:45.210Z

Reserved: 2026-09-25T10:25:14.383Z

Link: CVE-2026-98975

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T13:17:19.157

Modified: 2026-10-24T14:16:50.093

Link: CVE-2026-98975

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-23T00:00:00Z

Links: CVE-2026-98975 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T14:30:16Z

Weaknesses