CVE-2026-93813 (GCVE-0-2026-93813)
Vulnerability from cvelistv5
Published
2026-09-24 16:02
Modified
2026-10-03 10:57
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: tree-checker: validate INODE_REF's namelen [BUG] A crafted btrfs image can trigger the following crash: BUG: unable to handle page fault for address: ffffd1dc42884000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page CPU: 9 UID: 0 PID: 1034 Comm: poc Not tainted 7.1.0-rc4-custom+ #383 PREEMPT(full) 46af0a92938a63be7132e0dfd71e62327c51d5c2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:memcpy+0xc/0x10 Call Trace: <TASK> read_extent_buffer+0xe4/0x100 [btrfs 3cf0785dd58fec8c5ff84633b772f17ce1f92a8f] btrfs_get_name+0x15e/0x1e0 [btrfs 3cf0785dd58fec8c5ff84633b772f17ce1f92a8f] reconnect_path+0x165/0x390 exportfs_decode_fh_raw+0x337/0x400 ? drop_caches_sysctl_handler+0xb0/0xb0 </TASK> ---[ end trace 0000000000000000 ]--- RIP: 0010:memcpy+0xc/0x10 Kernel panic - not syncing: Fatal exception [CAUSE] TThe crafted image has the following corrupted INODE_REF item: item 9 key (258 INODE_REF 257) itemoff 11544 itemsize 4106 index 2 namelen 4096 name: d\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 The itemsize matches the namelen, but the namelen is 4096, way larger than normal name length limit (BTRFS_NAME_LEN, 255). Meanwhile the memory of the @name is only 255 byte sized, this will cause out-of-boundary access, and cause the above crash. [FIX] Add extra namelen verification for INODE_REF, just like what we have done in ROOT_REF checks. Now the crafted image can be rejected gracefully: BTRFS critical (device dm-2): corrupt leaf: root=5 block=30572544 slot=14 ino=259, invalid inode ref name length, has 4096 expect [1, 255] BTRFS error (device dm-2): read time tree block corruption detected on logical 30572544 mirror 2 [ Rebase, add a Link: tag, add an simple cause analyze ]
Impacted products
Vendor Product Version
Linux Linux Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Version: 2ede0daf01549cecf4bb0962c46dc47382047523
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/tree-checker.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "60078a3e25c09d9d8fba828b0d81bb33e449a1b2",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            },
            {
              "lessThan": "509d6a4d889e425f305461d8323a7b39ca6c121c",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            },
            {
              "lessThan": "4cb41f07685f88ec724a375883bb0c731db8f6eb",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            },
            {
              "lessThan": "eeddee090b834a7d4b6a8214d2e3739e64c7a338",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            },
            {
              "lessThan": "8f75c19892263bc0555fba922aefe103e841e86d",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            },
            {
              "lessThan": "3dc22abc21f5892406c09202fa2627196cc96967",
              "status": "affected",
              "version": "2ede0daf01549cecf4bb0962c46dc47382047523",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/tree-checker.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.37"
            },
            {
              "lessThan": "2.6.37",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.222",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.189",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.158",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.111",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.53",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.222",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.189",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.158",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.111",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.53",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "2.6.37",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: tree-checker: validate INODE_REF\u0027s namelen\n\n[BUG]\nA crafted btrfs image can trigger the following crash:\n\n  BUG: unable to handle page fault for address: ffffd1dc42884000\n  #PF: supervisor write access in kernel mode\n  #PF: error_code(0x0002) - not-present page\n  CPU: 9 UID: 0 PID: 1034 Comm: poc Not tainted 7.1.0-rc4-custom+ #383 PREEMPT(full)  46af0a92938a63be7132e0dfd71e62327c51d5c2\n  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022\n  RIP: 0010:memcpy+0xc/0x10\n  Call Trace:\n   \u003cTASK\u003e\n   read_extent_buffer+0xe4/0x100 [btrfs 3cf0785dd58fec8c5ff84633b772f17ce1f92a8f]\n   btrfs_get_name+0x15e/0x1e0 [btrfs 3cf0785dd58fec8c5ff84633b772f17ce1f92a8f]\n   reconnect_path+0x165/0x390\n   exportfs_decode_fh_raw+0x337/0x400\n   ? drop_caches_sysctl_handler+0xb0/0xb0\n   \u003c/TASK\u003e\n  ---[ end trace 0000000000000000 ]---\n  RIP: 0010:memcpy+0xc/0x10\n  Kernel panic - not syncing: Fatal exception\n\n[CAUSE]\nTThe crafted image has the following corrupted INODE_REF item:\n\n         item 9 key (258 INODE_REF 257) itemoff 11544 itemsize 4106\n         \tindex 2 namelen 4096 name: d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\n\nThe itemsize matches the namelen, but the namelen is 4096, way larger\nthan normal name length limit (BTRFS_NAME_LEN, 255).\n\nMeanwhile the memory of the @name is only 255 byte sized, this will cause\nout-of-boundary access, and cause the above crash.\n\n[FIX]\nAdd extra namelen verification for INODE_REF, just like what we have\ndone in ROOT_REF checks.\n\nNow the crafted image can be rejected gracefully:\n\n BTRFS critical (device dm-2): corrupt leaf: root=5 block=30572544 slot=14 ino=259, invalid inode ref name length, has 4096 expect [1, 255]\n BTRFS error (device dm-2): read time tree block corruption detected on logical 30572544 mirror 2\n\n[ Rebase, add a Link: tag, add an simple cause analyze ]"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - check_inode_ref() failed to cap INODE_REF name_len, so a crafted leaf with name_len 4096 is accepted. Those bytes come from the mounted image, not a protocol field. The overflow is open_by_handle_at() \u2192 do_handle_to_path() \u2192 exportfs_decode_fh_raw() \u2192 reconnect_path() \u2192 btrfs_get_name(); btrfs_fid has only objectid/gen, so an NFS handle does not carry the bad namelen.\nAC:L - The attacker writes an INODE_REF whose name_len exceeds BTRFS_NAME_LEN (255) but fits the item (PoC: 4096/4106), which the old check_inode_ref() allowed. Mounting that image and calling open_by_handle_at() on a directory filehandle for that inode makes reconnect_path() call btrfs_get_name() every time; no race or uninducible device failure is required.\nPR:L - btrfs_fs_type lacks FS_USERNS_MOUNT, so mount_capable() needs init-ns CAP_SYS_ADMIN, but a local user can mount the image via udisks2/polkit. The trigger is open_by_handle_at(): may_decode_fh() admits ns_capable(current_user_ns(), CAP_DAC_READ_SEARCH) with capable_wrt_mount() and O_DIRECTORY, so userns root on that mount is enough.\nUI:N - The attacker authors the INODE_REF, mounts the image (udisks/loop), and calls open_by_handle_at() so reconnect_path() runs btrfs_get_name() on that inode. That is their own action against data they already control; no second user must open a file or confirm a dialog.\nS:U - btrfs_get_name()\u0027s overflow of exportfs_decode_fh_raw()\u0027s nbuf corrupts the host kernel stack only. It does not cross a KVM/Xen guest-host, IOMMU/DMA, or other security-authority boundary.\nC:H - read_extent_buffer() in btrfs_get_name() memcpy\u0027s the attacker-chosen INODE_REF name (PoC namelen 4096) into exportfs_decode_fh_raw()\u0027s nbuf[NAME_MAX+1] (256 bytes). That stack overflow overwrites saved frames and is kernel memory corruption usable for arbitrary disclosure.\nI:H - The same unbounded copy, plus name[name_len]=\u0027\\0\u0027 at offset 4096, is an attacker-controlled out-of-bounds write into kernel stack in exportfs_decode_fh_raw(). Chosen namelen/name bytes enable return-address overwrite and control-flow hijack, not a bounded metadata tweak.\nA:H - The reporter\u0027s PoC faults in memcpy() from read_extent_buffer() called by btrfs_get_name() (supervisor write to an unmapped address) and panics. Any name_len that runs nbuf off the mapped stack oopses the host."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-03T10:57:45.809Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/60078a3e25c09d9d8fba828b0d81bb33e449a1b2"
        },
        {
          "url": "https://git.kernel.org/stable/c/509d6a4d889e425f305461d8323a7b39ca6c121c"
        },
        {
          "url": "https://git.kernel.org/stable/c/4cb41f07685f88ec724a375883bb0c731db8f6eb"
        },
        {
          "url": "https://git.kernel.org/stable/c/eeddee090b834a7d4b6a8214d2e3739e64c7a338"
        },
        {
          "url": "https://git.kernel.org/stable/c/8f75c19892263bc0555fba922aefe103e841e86d"
        },
        {
          "url": "https://git.kernel.org/stable/c/3dc22abc21f5892406c09202fa2627196cc96967"
        }
      ],
      "title": "btrfs: tree-checker: validate INODE_REF\u0027s namelen",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-93813",
    "datePublished": "2026-09-24T16:02:49.907Z",
    "dateReserved": "2026-09-18T17:59:28.790Z",
    "dateUpdated": "2026-10-03T10:57:45.809Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…