CVE-2025-37956 (GCVE-0-2025-37956)
Vulnerability from cvelistv5
Published
2025-05-20 16:01
Modified
2026-08-05 11:58
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: prevent rename with empty string Client can send empty newname string to ksmbd server. It will cause a kernel oops from d_alloc. This patch return the error when attempting to rename a file or directory with an empty new name string.
Impacted products
Vendor Product Version
Linux Linux Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Version: 0626e6641f6b467447c81dd7678a69c66f7746cf
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smb2pdu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6ee551672c8cf36108b0cfba92ec0c7c28ac3439",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "c57301e332cc413fe0a7294a90725f4e21e9549d",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "d7f2c00acb1ef64304fd40ac507e9213ff1d9b5c",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "53e3e5babc0963a92d856a5ec0ce92c59f54bc12",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smb2pdu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.91",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.29",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.91",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.29",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.7",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: prevent rename with empty string\n\nClient can send empty newname string to ksmbd server.\nIt will cause a kernel oops from d_alloc.\nThis patch return the error when attempting to rename\na file or directory with an empty new name string."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - ksmbd is the in-kernel SMB server; the malformed FILE_RENAME_INFORMATION request arrives over TCP/445 (or SMB-Direct) from a remote client. No local access is involved.\nAC:L - The attacker deterministically triggers the uninitialized-qstr dereference by sending one SET_INFO request with FileNameLength=2 containing a UTF-16 NUL; no race or unpredictable precondition is required, and the stack residue that shapes the outcome is influenced by the attacker\u0027s own preceding requests on the same ksmbd worker.\nPR:L - smb2_set_info requires an established session, a tree connect to a writable share, and an open handle with FILE_DELETE access, so a low-privileged authenticated SMB account (or a guest-mapped session on guest-enabled shares) is needed. This matches sibling post-auth ksmbd CVEs such as CVE-2025-22040/22041.\nUI:N - The server processes the crafted rename request automatically in its worker thread; no action by any local user or administrator is needed.\nS:U - The wild read, dentry corruption and crash all occur within the kernel\u0027s own security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - __d_alloc() memcpy\u0027s from an uninitialized kernel-stack pointer with an uncontrolled length \u2014 an unbounded out-of-bounds read whose contents become the new dentry name, which the attacker can then read back over SMB via directory enumeration, disclosing kernel heap/stack data and pointers.\nI:H - The rename completes against a target derived from uninitialized kernel memory and leaves a dentry cached with a bogus d_name.len driving later name-switching memcpy\u0027s; on 32-bit ksmbd builds the `size + name-\u003elen` computation in __d_alloc() overflows, producing an undersized allocation followed by a multi-gigabyte memcpy \u2014 a heap write primitive.\nA:H - The commit states the empty name causes a kernel oops from d_alloc; a remote client can repeat the request at will to keep panicking the server, so availability loss is total."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:58:38.144Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6ee551672c8cf36108b0cfba92ec0c7c28ac3439"
        },
        {
          "url": "https://git.kernel.org/stable/c/c57301e332cc413fe0a7294a90725f4e21e9549d"
        },
        {
          "url": "https://git.kernel.org/stable/c/d7f2c00acb1ef64304fd40ac507e9213ff1d9b5c"
        },
        {
          "url": "https://git.kernel.org/stable/c/53e3e5babc0963a92d856a5ec0ce92c59f54bc12"
        }
      ],
      "title": "ksmbd: prevent rename with empty string",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-37956",
    "datePublished": "2025-05-20T16:01:49.865Z",
    "dateReserved": "2025-04-16T04:51:23.974Z",
    "dateUpdated": "2026-08-05T11:58:38.144Z",
    "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…