CVE-2026-98974
published high CVSS 3.1 · 7.8xfs: fix exchange-range-to-eof file size exchange
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux966ceafc7a437105ecfe1cadb3747b2965a260ca to < b361d32b884f8ddcb9bad5d99b69eece648f8e43 · 966ceafc7a437105ecfe1cadb3747b2965a260ca to < cf32eb20dfacfd2e92ce86ba1fece9ae5f98a7d8 · 966ceafc7a437105ecfe1cadb3747b2965a260ca to < 952b5c99a840c2bff1f6645fd5e06e1db6ec2623 · 966ceafc7a437105ecfe1cadb3747b2965a260ca to < 7dfb218c829c1acb626e0fe92c5fddb9a26a03e9 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.10 (affected) · 0 to < 6.10 (unaffected · semver) · 6.12.114 through 6.12.* (unaffected · semver) · 6.18.57 through 6.18.* (unaffected · semver) · 7.2.11 through 7.2.* (unaffected · semver) · 7.3 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-3402 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-3538 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 10 | kernel-abi-stablelists | Advisory build | 6.12.0-211.74.1.el10_2 | ALSA-2026:95367 |
| Debian | bookworm | linux-6.12 | Advisory build | 6.12.115-2~deb12u1 | DLA-4904-1 |
Show 98 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Oracle Linux | 10 | kernelx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| AlmaLinux | 10 | kernel-doc | Advisory build | 6.12.0-211.74.1.el10_2 | ALSA-2026:95367 |
| AlmaLinux | 9 | kernel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-devel-matched | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-debug-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-devel-matched | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-64k-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-abi-stablelists | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-cross-headers | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-devel-matched | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-debug-uki-virt | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-devel-matched | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-doc | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-headers | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-64k-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-debug-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-rt-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-tools | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-tools-libs | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-tools-libs-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-uki-virt | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-uki-virt-addons | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-devel | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-devel-matched | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-modules | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-core | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-extra | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | libperf | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | perf | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | python3-perf | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | rtla | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| AlmaLinux | 9 | rv | Advisory build | 5.14.0-741.20.1.el9_9 | ALSA-2026:97873 |
| Debian | trixie | linux | Advisory build | 6.12.115-2 | DSA-6602-1 |
| Oracle Linux | 10 | kernelx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-abi-stablelistsx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-abi-stablelistsx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-corex86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-corex86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-cross-headersaarch64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-cross-headersaarch64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-cross-headersx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-cross-headersx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debugx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debugx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debug-corex86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debug-corex86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debug-develx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debug-develx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debug-devel-matchedx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debug-devel-matchedx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debug-modulesx86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debug-modulesx86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
| Oracle Linux | 10 | kernel-debug-modules-corex86_64 | Advisory build | 0:6.12.0-211.74.1.el10_2 | ELSA-2026-95367 |
| Oracle Linux | 10 | kernel-debug-modules-corex86_64 | Advisory build | 0:6.12.0-264.14.1.el10_3 | ELSA-2026-98608 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: xfs: fix exchange-range-to-eof file size exchange Norbert Szetei posted a patch containing an incomplete description of a bug in XFS_IOC_EXCHANGE_RANGE's TO_EOF flag. The bug tricks exchange-range into modifying a file so that it has shared blocks starting beyond EOF, which is never allowed because files never have written data beyond EOF, and you can only share written data blocks. This is key to all the incorrect behavior that follows. Eventually I got from Norbert a description of what's going wrong: > Fair. Here it is with physical block numbers, 4k blocks. peer is the file > that gets rewritten and file1 is the one that ends up with the flag > cleared. > > Start, nothing shared: > > peer size 4096 -> [100] > file1 size 12288 -> [200] [201] [202] > donor1 size 4096 -> [300] > donor2 size 4096 -> [400] > > 1. FICLONERANGE peer's block into file1's middle slot: > > peer size 4096 -> [100] > file1 size 12288 -> [200] [100] [202] reflink flag set > ^^^^^ both files own block 100 > > 2. XFS_IOC_EXCHANGE_RANGE file1 against donor1, file1_offset 0, > file2_offset 8192, length 0, TO_EOF. One block is exchanged, and the sizes > are exchanged with it: > > file1 size 4096 -> [200] [100] [300] reflink flag set > ^^^^^^^^^^^ still owned, now past the size > donor1 size 12288 -> [202] > > file1 says it is one block long while it still owns three. Nothing was > unmapped. file2_offset is block 2, so this exchange cannot clear a flag. > > 3. XFS_IOC_EXCHANGE_RANGE file1 against donor2, both offsets 0, length 4096. > By i_disk_size this is two one-block files exchanging everything, so > xmi_can_exchange_reflink_flags() agrees and the flag is cleared: > > file1 size 4096 -> [400] [100] [300] reflink flag CLEARED > donor2 size 4096 -> [200] > > Block 100 is still shared with peer. > > 4. pwrite(file1, 4096, 4096), which is file1's second slot, block 100. > xfs_is_cow_inode(file1) is false, so no CoW: > > peer size 4096 -> [100] same block, new contents > > Block 100 is the only one that matters here. PoC below, it reads a file > called peer in the current directory. The filesystem needs reflink and > exchange-range, which mkfs.xfs 7.x turns on by default. So yes, TO_EOF is screwing up the file size even if it's actually exchanging the data block correctly. The following is the intended behavior of XFS_EXCHANGE_RANGE_TO_EOF, as described by its manpage: "Ignore the length parameter. All bytes in file1_fd from file1_offset to EOF are moved to file2_fd, and file2's size is set to (file2_offset+(file1_length-file1_offset)). Meanwhile, all bytes in file2 from file2_offset to EOF are moved to file1 and file1's size is set to (file1_offset+(file2_length-file2_offset))." In other words, if we only exchange a portion of the file data, then we should only exchange the portion of the file size that relates to the exchanged data. Unfortunately, the code swaps the ondisk file size and the incore file sizes, which is incorrect if the caller passes in a nonzero offset. Having confused the file sizes, the PoC uses a second exchange-range call on what looks like a non-reflinked single-block file. Because the file size is set incorrectly, exchange-range thinks it's exchanging the full contents of two files and clears the reflink flag on the broken file. That enables an extending write of the broken file to rewrite the shared block that's just past EOF. This has become known colloquially as refluxfs. Once the file sizes are set correctly, the second exchange-range no longer thinks that it's doing a full-contents swap, so it won't clear the reflink flag on either of its file arguments. Norbert followed up to an earlier version of this patch with a second complaint about us not handling the i_disk_size state correctly: > The offsets are bounded against the incore i_size but subtracted from > ---truncated---
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The attacker-controlled offsets and XFS_EXCHANGE_RANGE_TO_EOF flag enter through ioctl(2), then xfs_file_ioctl -> xfs_ioc_exchange_range -> xfs_exchange_range -> xfs_exchrange_mappings/xfs_exchmaps_init_intent, the two patched functions; no network data reaches this path. AC:L - On XFS with reflink and exchange-range enabled, one process can deterministically clone a readable peer block, issue the TO_EOF and full-range exchanges, then pwrite; every transition is attacker-controlled and no race is required. PR:L - xfs_exchange_range requires read/write access to the exchanged files, which can be attacker-owned. The protected peer is only the FICLONERANGE source, and vfs_clone_file_range requires MAY_READ on it without any capability check. UI:N - The attacker alone invokes FICLONERANGE, two XFS_IOC_EXCHANGE_RANGE operations, and pwrite against an already-mounted XFS filesystem; no victim must open a file or mount attacker-supplied media. S:U - The incorrect size exchange in xfs_exchmaps_init_intent and resulting CoW bypass affect files and privileges within the same host kernel security authority; no VM, IOMMU, or other scope boundary is crossed. C:H - After xfs_exchmaps_clear_reflink removes XFS_DIFLAG2_REFLINK, xfs_is_cow_inode returns false and pwrite can alter a still-shared block in a readable root-owned setuid executable; its unchanged privileged metadata permits root execution and access to all host data. I:H - The non-CoW pwrite supplies controlled full-block contents to a physical extent still owned by a root-owned readable file, allowing arbitrary modification of protected files on the same XFS volume despite DAC. A:H - The same controlled shared-block overwrite can corrupt the headers or code of essential readable system binaries, libraries, or boot files on XFS, causing complete service or system failure.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 966ceafc7a437105ecfe1cadb3747b2965a260ca to < b361d32b884f8ddcb9bad5d99b69eece648f8e43 (affected · git)966ceafc7a437105ecfe1cadb3747b2965a260ca to < cf32eb20dfacfd2e92ce86ba1fece9ae5f98a7d8 (affected · git)966ceafc7a437105ecfe1cadb3747b2965a260ca to < 952b5c99a840c2bff1f6645fd5e06e1db6ec2623 (affected · git)966ceafc7a437105ecfe1cadb3747b2965a260ca to < 7dfb218c829c1acb626e0fe92c5fddb9a26a03e9 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.10 (affected)0 to < 6.10 (unaffected · semver)6.12.114 through 6.12.* (unaffected · semver)6.18.57 through 6.18.* (unaffected · semver)7.2.11 through 7.2.* (unaffected · semver)7.3 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
xfs: fix exchange-range-to-eof file size exchange
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d6c210f9e2656c3bb93d1311926e5e4e57676441e0345b551f2893830a668818
- Ingested
- 24 Oct 2026, 14:14:52 UTC
- Source record
- Official CVE record