Skip to content
Heist/ feed
High

xfs: fix exchange-range-to-eof file size exchange

Type: advisorySource: Official CVE List1 source record

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

Announced Source revision 1
Original source ↗

CVE-2026-98974

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-98974

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "966ceafc7a437105ecfe1cadb3747b2965a260ca",
        "lessThan": "b361d32b884f8ddcb9bad5d99b69eece648f8e43",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "966ceafc7a437105ecfe1cadb3747b2965a260ca",
        "lessThan": "cf32eb20dfacfd2e92ce86ba1fece9ae5f98a7d8",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "966ceafc7a437105ecfe1cadb3747b2965a260ca",
        "lessThan": "952b5c99a840c2bff1f6645fd5e06e1db6ec2623",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "966ceafc7a437105ecfe1cadb3747b2965a260ca",
        "lessThan": "7dfb218c829c1acb626e0fe92c5fddb9a26a03e9",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/xfs/libxfs/xfs_exchmaps.c",
      "fs/xfs/xfs_exchrange.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.10"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.10",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.12.114",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.57",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.11",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/xfs/libxfs/xfs_exchmaps.c",
      "fs/xfs/xfs_exchrange.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-98974

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#55715 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement