← Back to CVE Explorer

CVE-2026-64400

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: prevent path traversal bypass by restricting caseless retry ksmbd_vfs_path_lookup() enforces LOOKUP_BENEATH to restrict path resolution within the share root. When a crafted path attempts to escape the share boundary using parent-directory components ('..'), vfs_path_parent_lookup() detects this and immediately fails, returning -EXDEV. However, a bug exists in __ksmbd_vfs_kern_path() under caseless mode. The function fails to intercept the -EXDEV error and erroneously falls through to the caseless retry logic, which is intended only for genuinely missing files. During this retry process, the path is reconstructed, leading to an unintended LOOKUP_BENEATH bypass that allows write-capable users to create zero-length files or directories outside the exported share. Fix this by ensuring that the execution only proceeds to the caseless lookup retry when the error is specifically -ENOENT. Any other errors, such as -EXDEV from a path traversal attempt, must be returned immediately.

Severity
HIGH
CVSS score
8.6 (v3.1)
Vulnerability status
Modified
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-07-25 10:17:23.510000
Last modified
2026-10-30 13:19:36.180000
View original CVE JSON
{
  "id": "CVE-2026-64400",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-07-25T10:17:23.510",
  "lastModified": "2026-10-30T13:19:36.180",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: prevent path traversal bypass by restricting caseless retry\n\nksmbd_vfs_path_lookup() enforces LOOKUP_BENEATH to restrict path\nresolution within the share root. When a crafted path attempts to\nescape the share boundary using parent-directory components ('..'),\nvfs_path_parent_lookup() detects this and immediately fails,\nreturning -EXDEV.\n\nHowever, a bug exists in __ksmbd_vfs_kern_path() under caseless mode.\nThe function fails to intercept the -EXDEV error and erroneously\nfalls through to the caseless retry logic, which is intended only\nfor genuinely missing files. During this retry process, the path\nis reconstructed, leading to an unintended LOOKUP_BENEATH bypass\nthat allows write-capable users to create zero-length files or\ndirectories outside the exported share.\n\nFix this by ensuring that the execution only proceeds to the caseless\nlookup retry when the error is specifically -ENOENT. Any other errors,\nsuch as -EXDEV from a path traversal attempt, must be returned immediately."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "fs/smb/server/vfs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6927ffe7479c72e7ebf885507227266a75f7c97d",
              "lessThan": "21f050439db157f2afcc19885dec14549ca6ffc0",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "74d7970febf7e9005375aeda0df821d2edffc9f7",
              "lessThan": "eec1dd2586c4016b7555a5d047db2b3756459fb2",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "74d7970febf7e9005375aeda0df821d2edffc9f7",
              "lessThan": "a1c331d98313380c38f616c8b28b890ec8ef9c28",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "74d7970febf7e9005375aeda0df821d2edffc9f7",
              "lessThan": "cfb5a56c218888f9d74165dff0c282cd0be97983",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "74d7970febf7e9005375aeda0df821d2edffc9f7",
              "lessThan": "8c9a4f1327eb71efbf14842e7b8a6d965077eb67",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "74d7970febf7e9005375aeda0df821d2edffc9f7",
              "lessThan": "54bab9ba5a9f156ffa9324fcbe5a356fd0242f95",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "019aae488dbc67c97a33db03652e20e2c9e3afa7",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "ef6cc1c465786b3e4e735d1ab8b616b3e94402df",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "6.1.71",
              "lessThan": "6.1.191",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "5.15.145",
              "lessThan": "5.16",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "6.3.10",
              "lessThan": "6.4",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "fs/smb/server/vfs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6.4",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "6.4",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.191",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.160",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.114",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.57",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.1.4",
              "lessThanOrEqual": "7.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
          "baseScore": 8.6,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 4.7
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.15.145",
              "versionEndExcluding": "5.16",
              "matchCriteriaId": "B98C9201-BF17-4E2C-84FF-75EE2AA94DC5"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.1.71",
              "versionEndExcluding": "6.2",
              "matchCriteriaId": "163E72B5-0F5D-49E2-AAEA-F11E02D730AD"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.3.10",
              "versionEndExcluding": "7.1.4",
              "matchCriteriaId": "39D96392-5639-49DA-9355-4E876D0A8B6C"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/21f050439db157f2afcc19885dec14549ca6ffc0",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/54bab9ba5a9f156ffa9324fcbe5a356fd0242f95",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/8c9a4f1327eb71efbf14842e7b8a6d965077eb67",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/a1c331d98313380c38f616c8b28b890ec8ef9c28",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/cfb5a56c218888f9d74165dff0c282cd0be97983",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/eec1dd2586c4016b7555a5d047db2b3756459fb2",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}