Skip to content
Heist/ feed
Critical

btrfs: fix xattr replace when multiple xattrs are packed in the same item

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix xattr replace when multiple xattrs are packed in the same item If we have a btrfs_dir_item item that packs multiple xattrs and then we replace the value of one of them (with the setxattr(2) family of syscalls) with another value of a different size, we end up not having a fully initialized btrfs_dir_item, resulting in a corruption that the tree checker will detect at extent buffer writeback time. This is because in btrfs_setxattr() when we find a btrfs_dir_item with multiple xattrs (due to the crc32c hash of their name being the same) we delete one of the xattr items (btrfs_dir_item) and then insert a new one, but the deletion and insertion results in shifting existing data in the leaf and therefore when the new value of a xattr has a different size, the new btrfs_dir_item is placed in a leaf section that was not initialized and we only copy the value's data and set the value's length in the new btrfs_dir_item, without setting the name, the name's length, the key (which must be all zeroes for xattrs), flags (BTRFS_FT_XATTR) and transaction ID. The following script reproduces the issue: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV mount $DEV $MNT touch $MNT/testfile # Add two xattrs that, on btrfs, have the same hash (crc32c) for their # name and therefore are packed into the same btrfs_dir_item. setfattr -n user.foobar -v 123 $MNT/testfile setfattr -n user.WvG1c1Td -v qwer

Announced Group revision 1
Original source ↗

CVE-2026-98959

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-98959

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": "5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339",
        "lessThan": "7a53bb4668b319fc6c8a3ce2c21635125c7d2712",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339",
        "lessThan": "5877d7138cc4359d26fd7b010eedfd1b3162348f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339",
        "lessThan": "a97114b9b00ed3d05156f3b2ddbf797296260389",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339",
        "lessThan": "c1803697a60f22743aa28ad522f805e92d45e3f0",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339",
        "lessThan": "858bee1c77857aabcc2327cd32dd8266332de332",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f2e3615d181a7028ab797114c5960977669b2a",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "a873146ce4fb025c0b5c1322af5a6bad042f5363",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "02590fd855d1690568b2fa439c942e933221b57a",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "55e97f654cbbbef70f9714f0e113604dd931e360",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "3.10.83",
        "lessThan": "3.11",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "3.12.45",
        "lessThan": "3.13",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "3.14.47",
        "lessThan": "3.15",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "3.18.19",
        "lessThan": "3.19",
        "versionType": "semver"
      }
    ],
    "programFiles": [
      "fs/btrfs/xattr.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "3.19"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "3.19",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.113",
        "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/btrfs/xattr.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-98959

Source reference: /cveMetadata/cveId

Publisher severity

critical

Source reference: /containers/cna/metrics

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