Look up another CVE · open CVE-2025-37956 in the interactive tracker
CVE-2025-37956
ksmbd: prevent rename with empty string
Published 2025-05-20 (17 months ago) by the Linux kernel CNA. Subsystem fs/smb. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-37956 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.29-1 | Update the kernel and reboot. Fixed in 6.12.29-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.29-1 | Update the kernel and reboot. Fixed in 6.12.29-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.29-1 | Update the kernel and reboot. Fixed in 6.12.29-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
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.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/smb/server/smb2pdu.c
- What this is
- KERNEL SMB3 SERVER (KSMBD)MAINTAINERS section matched on fs/smb/server/ · linux-cifs@vger.kernel.org · Maintained
- Kernel module
- ksmbd
Check it on the machine
grep -wE 'CONFIG_SMBFS|CONFIG_SMB_SERVER' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w ksmbdPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.
- bookworm, trixie, forky, sidm
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- Build switches
- CONFIG_SMBFS, CONFIG_SMB_SERVER
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-05-20 (17 months ago)source
- CVSS
- 8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- network (AV:N)source
- EPSS
- 0.38%, higher than 30.4% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/smb
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.15 | 6.6.91 | 6ee551672c8c |
| 5.15 | 6.12.29 | c57301e332cc |
| 5.15 | 6.14.7 | d7f2c00acb1e |
| 5.15 | 6.15 | 53e3e5babc09 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:NAttack vector, network
- 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.
- AC:LAttack complexity, low
- 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.
- PR:LPrivileges required, low
- 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.
- UI:NUser interaction, none
- The server processes the crafted rename request automatically in its worker thread; no action by any local user or administrator is needed.
- S:UScope, unchanged
- The wild read, dentry corruption and crash all occur within the kernel's own security authority; no VM, IOMMU or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- __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.
- I:HIntegrity impact, high
- 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.
- A:HAvailability impact, high
- 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.