« Volver al listado

CVE-2023-53618

Estado: AnalizadaMedia (5.5)—

In the Linux kernel, the following vulnerability has been resolved:

btrfs: reject invalid reloc tree root keys with stack dump

[BUG] Syzbot reported a crash that an ASSERT() got triggered inside prepare_to_merge().

That ASSERT() makes sure the reloc tree is properly pointed back by its subvolume tree.

[CAUSE] After more debugging output, it turns out we had an invalid reloc tree:

Note the above root key is (TREE_RELOC_OBJECTID, ROOT_ITEM, QUOTA_TREE_OBJECTID), meaning it's a reloc tree for quota tree.

But reloc trees can only exist for subvolumes, as for non-subvolume trees, we just COW the involved tree block, no need to create a reloc tree since those tree blocks won't be shared with other trees.

Leer descripción completaMostrar menos

Only subvolumes tree can share tree blocks with other trees (thus they have BTRFS_ROOT_SHAREABLE flag).

Thus this new debug output proves my previous assumption that corrupted on-disk data can trigger that ASSERT().

[FIX] Besides the dedicated fix and the graceful exit, also let tree-checker to check such root keys, to make sure reloc trees can only exist for subvolumes.

Detalles técnicos trazas, registros y código del informe original
  BTRFS error (device loop1): reloc tree mismatch, root 8 has no reloc root, expect reloc root key (-8, 132, 8) gen 17

CVSS

Probabilidad de explotación (EPSS)

EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).

Tecnologías afectadas (1)

CWE

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2023-53618",
  "cveTags": [],
  "metrics": {
    "cvssMetricV31": [
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "scope": "UNCHANGED",
          "version": "3.1",
          "baseScore": 5.5,
          "attackVector": "LOCAL",
          "baseSeverity": "MEDIUM",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "integrityImpact": "NONE",
          "userInteraction": "NONE",
          "attackComplexity": "LOW",
          "availabilityImpact": "HIGH",
          "privilegesRequired": "LOW",
          "confidentialityImpact": "NONE"
        },
        "impactScore": 3.6,
        "exploitabilityScore": 1.8
      }
    ]
  },
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "259ee7754b6793af8bdd77f9ca818bc41cfe9541",
              "lessThan": "314135b7bae9618a317874ae195272682cf2d5d4",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "259ee7754b6793af8bdd77f9ca818bc41cfe9541",
              "lessThan": "3ae93b316ca4b8b3c33798ef1d210355f2fb9318",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "259ee7754b6793af8bdd77f9ca818bc41cfe9541",
              "lessThan": "84256e00eeca73c529fc6196e478cc89b8098157",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "259ee7754b6793af8bdd77f9ca818bc41cfe9541",
              "lessThan": "6ebcd021c92b8e4b904552e4d87283032100796d",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "3d95c52d789ca99e344061d7f6dadb2519adbcf5",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "fba904d68c8bbfcc89c2210cfcb2351be90bc3e5",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "5.2.19",
              "lessThan": "5.3",
              "versionType": "semver"
            },
            {
              "status": "affected",
              "version": "5.3.4",
              "lessThan": "5.4",
              "versionType": "semver"
            }
          ],
          "programFiles": [
            "fs/btrfs/disk-io.c",
            "fs/btrfs/tree-checker.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.4"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "5.4",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "5.15.127",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "status": "unaffected",
              "version": "6.1.46",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "status": "unaffected",
              "version": "6.4.11",
              "versionType": "semver",
              "lessThanOrEqual": "6.4.*"
            },
            {
              "status": "unaffected",
              "version": "6.5",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "fs/btrfs/disk-io.c",
            "fs/btrfs/tree-checker.c"
          ],
          "defaultStatus": "affected"
        }
      ]
    }
  ],
  "published": "2025-10-07T16:15:44.297",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/314135b7bae9618a317874ae195272682cf2d5d4",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/3ae93b316ca4b8b3c33798ef1d210355f2fb9318",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/6ebcd021c92b8e4b904552e4d87283032100796d",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/84256e00eeca73c529fc6196e478cc89b8098157",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "type": "Primary",
      "source": "nvd@nist.gov",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: reject invalid reloc tree root keys with stack dump\n\n[BUG]\nSyzbot reported a crash that an ASSERT() got triggered inside\nprepare_to_merge().\n\nThat ASSERT() makes sure the reloc tree is properly pointed back by its\nsubvolume tree.\n\n[CAUSE]\nAfter more debugging output, it turns out we had an invalid reloc tree:\n\n  BTRFS error (device loop1): reloc tree mismatch, root 8 has no reloc root, expect reloc root key (-8, 132, 8) gen 17\n\nNote the above root key is (TREE_RELOC_OBJECTID, ROOT_ITEM,\nQUOTA_TREE_OBJECTID), meaning it's a reloc tree for quota tree.\n\nBut reloc trees can only exist for subvolumes, as for non-subvolume\ntrees, we just COW the involved tree block, no need to create a reloc\ntree since those tree blocks won't be shared with other trees.\n\nOnly subvolumes tree can share tree blocks with other trees (thus they\nhave BTRFS_ROOT_SHAREABLE flag).\n\nThus this new debug output proves my previous assumption that corrupted\non-disk data can trigger that ASSERT().\n\n[FIX]\nBesides the dedicated fix and the graceful exit, also let tree-checker to\ncheck such root keys, to make sure reloc trees can only exist for subvolumes."
    }
  ],
  "lastModified": "2026-06-17T06:45:43.750",
  "configurations": [
    {
      "nodes": [
        {
          "negate": false,
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "48875F15-B129-4684-8556-4EAD32A9586F",
              "versionEndExcluding": "5.3",
              "versionStartIncluding": "5.2.19"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "96E6BF19-FB03-4C7D-B953-056D6BAD2410",
              "versionEndExcluding": "5.15.127",
              "versionStartIncluding": "5.3.4"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "D8B8CC90-9492-465C-81D4-10DA3B712286",
              "versionEndExcluding": "6.1.46",
              "versionStartIncluding": "5.16"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "C36FD9E6-B6D7-4887-8F08-C1F64E139D5C",
              "versionEndExcluding": "6.4.11",
              "versionStartIncluding": "6.2"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.5:rc1:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "0B3E6E4D-E24E-4630-B00C-8C9901C597B0"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.5:rc2:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "E4A01A71-0F09-4DB2-A02F-7EFFBE27C98D"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.5:rc3:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "F5608371-157A-4318-8A2E-4104C3467EA1"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.5:rc4:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "2226A776-DF8C-49E0-A030-0A7853BB018A"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.5:rc5:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "6F15C659-DF06-455A-9765-0E6DE920F29A"
            }
          ],
          "operator": "OR"
        }
      ]
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}