Skip to content
Heist/ feed
Unrated

btrfs: fix use-after-free on reloc root after error in insert_dirty_subvol()

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free on reloc root after error in insert_dirty_subvol() If during relocation we fail in insert_dirty_subvol() because btrfs_update_reloc_root() returned an error, we will leave a root's reloc_root field pointing to a reloc root that was freed instead of NULL, resulting later in a use-after-free, or double free attempt during unmount. The sequence of steps is this: 1) During relocation the call to btrfs_update_reloc_root() in insert_dirty_subvol() fails, so insert_dirty_subvol() returns the error to merge_reloc_root() without adding the root to the list rc->dirty_subvol_roots; 2) Then merge_reloc_root() aborts the current transaction because insert_dirty_subvol() returned an error; 3) Up the call chain, merge_reloc_roots() gets the error, adds the reloc root for root X to the local reloc_roots list and jumps to the 'out' label, where it calls free_reloc_roots() to free all the reloc roots in the local reloc_roots list. This frees the reloc root for root X; 4) We go up the call chain to relocate_block_group() which calls clean_dirty_subvols() to go over dirty roots and set their ->reloc_root field to NULL, but root X is not in the dirty_subvol_roots list, so its ->reloc_root still points to a reloc root; 5) Relocation finishes, with an error and a transaction abort, but the ->reloc_root field for root X still points to the reloc root that was freed in step 3; 6) When unmounting the fs we en

Announced Group revision 1
Original source ↗

CVE-2026-93800

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

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": "f32b84d7c977e1906a4781b93b3c93090b6cd675",
        "lessThan": "5a247097c5f94b51ffc991b444d998ad6e85875f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "6372dd394ea907cd85a7a8063db320ec73dfaed0",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "9f599d120b2b79d2d937c3935b7cdf2697514283",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "a01837ae174a2a968c245a30e6dd010f50eaf05d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "97a540d72ebcb21853d11f2a56782fe377f358e7",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "fda1b6636ff1846f00643e791099db5564b547d9",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "592fbcd50c99b8adf999a2a54f9245caff333139",
        "lessThan": "83201804efa4a5168be754e1dfc9b2faee760cac",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "aa18bc1ff8a51f082d5b3b6d07693797637b4028",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4cb0aea2e250eee35ccfac5f5395cd8f3238a9e5",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "5.10.36",
        "lessThan": "5.10.271",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "5.11.20",
        "lessThan": "5.12",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "5.12.3",
        "lessThan": "5.13",
        "versionType": "semver"
      }
    ],
    "programFiles": [
      "fs/btrfs/relocation.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.13"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.13",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.10.271",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.222",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.189",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.158",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.111",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.53",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/btrfs/relocation.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-93800

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

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