Look up another CVE · open CVE-2025-39720 in the interactive tracker
CVE-2025-39720
ksmbd: fix refcount leak causing resource not released
Published 2025-09-05 (13 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-39720 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 | fixedDSA-6008-1 · 2025-09-22 · text | 6.12.48-1 | Update the kernel and reboot. DSA-6008-1 shipped the fix on 2025-09-22, in 6.12.48-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.16.5-1 | Update the kernel and reboot. Fixed in 6.16.5-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.16.5-1 | Update the kernel and reboot. Fixed in 6.16.5-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
When ksmbd_conn_releasing(opinfo->conn) returns true,the refcount was not decremented properly, causing a refcount leak that prevents the count from reaching zero and the memory from being released.
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/oplock.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-09-05 (13 months ago)source
- CVSS
- 7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hsource recompute it - Attack vector
- network (AV:N)source
- EPSS
- 0.29%, higher than 19.8% 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.103 | a1d2bab4d533 |
| 5.15 | 6.12.44 | 36e010bb865f |
| 5.15 | 6.16.4 | 9a7abce6e8c0 |
| 5.15 | 6.17 | 89bb430f6211 |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DSA-6008-1 | 2025-09-22 | trixie 6.12.48-1 | tracker |
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
- The vulnerable code is in ksmbd, the in-kernel SMB server listening on TCP/445, and is driven entirely by remote SMB2 CREATE/WRITE/CLOSE traffic and connection teardown. No local access is needed.
- AC:LAttack complexity, low
- The leak is deterministic, not a race: `ksmbd_conn_set_releasing()` runs before the file table is torn down, so `smb_lazy_parent_lease_break_close()` always sees the connection's own v2 directory-lease opinfo with `conn` already RELEASING. The multi-connection variant against `smb_break_all_levII_oplock()` is also fully attacker-controlled and the window can be widened at will by keeping a request pending.
- PR:NPrivileges required, none
- ksmbd supports guest/anonymous sessions (`user_guest()`, `SMB2_SESSION_FLAG_IS_GUEST_LE`), so on the guest-mapped shares typical of NAS and embedded deployments an unauthenticated client can open a file with a lease and reach these paths; otherwise only an ordinary unprivileged SMB account is needed.
- UI:NUser interaction, none
- The attacker triggers everything itself by opening a leased handle and closing the connection; no action by any local user or administrator is involved.
- S:UScope, unchanged
- The leaked allocations and the resulting exhaustion are confined to the kernel's own memory, the same security authority as the vulnerable ksmbd code. No boundary such as VM or IOMMU is crossed.
- C:NConfidentiality impact, none
- Nothing is freed early, read out of bounds, or copied to the client; the only effect is that objects are never released. No kernel data or pointer value is exposed.
- I:NIntegrity impact, none
- No memory is overwritten and no file or kernel state is modified incorrectly; the reference count simply never reaches zero.
- A:HAvailability impact, high
- Each trigger permanently leaks an `oplock_info`, `lease`, the whole `ksmbd_conn`, the `tcp_transport`/iov, and the accepted TCP socket (since `sock_release()` only runs on the final conn put), and it can be repeated per connection without bound, driving the kernel to unreclaimable memory exhaustion and OOM.