{"id":"CVE-2025-37956","state":"PUBLISHED","title":"ksmbd: prevent rename with empty string","description":"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.","publishedAt":"2025-05-20T16:01:49.865Z","updatedAt":"2026-10-30T12:21:28.534Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"35e2964e93d95185d2db0c0ffd9959d0197b3956","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6ee551672c8cf36108b0cfba92ec0c7c28ac3439","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"c57301e332cc413fe0a7294a90725f4e21e9549d","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"d7f2c00acb1ef64304fd40ac507e9213ff1d9b5c","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"53e3e5babc0963a92d856a5ec0ce92c59f54bc12","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.91","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.29","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.7","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":["https://git.kernel.org/stable/c/35e2964e93d95185d2db0c0ffd9959d0197b3956","https://git.kernel.org/stable/c/6ee551672c8cf36108b0cfba92ec0c7c28ac3439","https://git.kernel.org/stable/c/c57301e332cc413fe0a7294a90725f4e21e9549d","https://git.kernel.org/stable/c/d7f2c00acb1ef64304fd40ac507e9213ff1d9b5c","https://git.kernel.org/stable/c/53e3e5babc0963a92d856a5ec0ce92c59f54bc12"],"weaknesses":[],"ingestedAt":"2026-10-30T12:38:04.623Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37956.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37956","state":"PUBLISHED","datePublished":"2025-05-20T16:01:49.865Z","dateUpdated":"2026-10-30T12:21:28.534Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.974Z"},"containers":{"cna":{"title":"ksmbd: prevent rename with empty string","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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"35e2964e93d95185d2db0c0ffd9959d0197b3956","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6ee551672c8cf36108b0cfba92ec0c7c28ac3439","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"c57301e332cc413fe0a7294a90725f4e21e9549d","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"d7f2c00acb1ef64304fd40ac507e9213ff1d9b5c","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"53e3e5babc0963a92d856a5ec0ce92c59f54bc12","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.91","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.29","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.7","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/35e2964e93d95185d2db0c0ffd9959d0197b3956"},{"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"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"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's 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's own security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - __d_alloc() memcpy's from an uninitialized kernel-stack pointer with an uncontrolled length — 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's; on 32-bit ksmbd builds the `size + name->len` computation in __d_alloc() overflows, producing an undersized allocation followed by a multi-gigabyte memcpy — 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":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:21:28.534Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.91"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.29"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.14.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}