data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2025-21955 in the interactive tracker

CVE-2025-21955

ksmbd: prevent connection release during oplock break notification

8.8 EPSS 0.5% AV:N

Published 2025-04-01 (19 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-21955 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

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No 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 13trixiefixed6.12.20-1Update the kernel and reboot. Fixed in 6.12.20-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.20-1Update the kernel and reboot. Fixed in 6.12.20-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.20-1Update the kernel and reboot. Fixed in 6.12.20-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

ksmbd_work could be freed when after connection release. Increment r_count of ksmbd_conn to indicate that requests are not finished yet and to not release the connection.

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/connection.c
fs/smb/server/connection.h
fs/smb/server/oplock.c
fs/smb/server/server.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 ksmbd

Prints 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-04-01 (19 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.50%, higher than 41.1% 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

IntroducedFixed inCommit
5.156.6.8409aeab680331
5.156.12.20a4261bbc33fb
5.156.13.8f17d1c63a76b
5.156.143aa660c05924

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 listening on TCP/445; the entire path (oplock grant, oplock break trigger, and the connection reset that wins the race) is driven purely by SMB2 traffic from remote clients.
AC:LAttack complexity, low
The attacker owns both sides of the race — connection A holds the oplock, connection B triggers the break notification, and the attacker chooses exactly when to reset A's socket — and can retry the sequence unlimited times over the network.
PR:LPrivileges required, low
Reaching an oplock/lease break requires an established SMB2 session and tree connect (SMB2_CREATE with an oplock or lease context), so valid low-privileged share credentials (or a guest mapping) are needed; it is not a pre-authentication code path.
UI:NUser interaction, none
No victim action is required — the attacker's own two connections create the oplock, trigger the break, and tear down the connection entirely on their own schedule.
S:UScope, unchanged
The use-after-free is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
The freed ksmbd_conn/tcp_transport objects are dereferenced after release, and reclaiming those kmalloc-64 slots with attacker-sprayed data yields a read primitive over kernel memory and leaks server/session state.
I:HIntegrity impact, high
ksmbd_conn_write() performs an indirect call through conn->transport->ops->writev read out of the freed transport, giving control-flow hijack and arbitrary-write potential once the slab is reclaimed with controlled contents.
A:HAvailability impact, high
Even without successful grooming the stale dereference of the freed connection, transport, and released socket reliably oopses or panics the kernel, killing the SMB server host.