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

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

CVE-2025-37777

ksmbd: fix use-after-free in __smb2_lease_break_noti()

8.8 EPSS 0.4% AV:N

Published 2025-05-01 (18 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-37777 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.27-1Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.27-1Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.27-1Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

Move tcp_transport free to ksmbd_conn_free. If ksmbd connection is referenced when ksmbd server thread terminates, It will not be freed, but conn->tcp_transport is freed. __smb2_lease_break_noti can be performed asynchronously when the connection is disconnected. __smb2_lease_break_noti calls ksmbd_conn_write, which can cause use-after-free when conn->ksmbd_transport is already freed.

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/transport_tcp.c
fs/smb/server/transport_tcp.h

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-05-01 (18 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.37%, higher than 29.5% 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.1011da8bd9a10ec
5.156.12.261aec4d14cf81
5.156.14.4e59796fc8060
5.156.1521a4e47578d4

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, and the entire trigger sequence (CREATE with a lease context, TCP disconnect, conflicting CREATE from a second connection) is driven purely by remote SMB2 traffic. No local access is needed.
AC:LAttack complexity, low
The attacker fully controls both sides of the race by opening two connections — one takes a lease and disconnects, the other forces the lease break — and can repeat it indefinitely until the RCU-deferred opinfo teardown overlaps the transport free. Per guidance, an attacker-created race and a use-after-free are Low.
PR:LPrivileges required, low
Reaching `alloc_opinfo()` requires a completed SESSION_SETUP, TREE_CONNECT and SMB2 CREATE with an RqLs lease context, so an authenticated (any unprivileged share user, including guest where mapped) SMB account is needed. This matches the scoring of the sibling post-authentication ksmbd UAFs.
UI:NUser interaction, none
The attacker drives every step from its own SMB connections; no action by an administrator or any other client is required.
S:UScope, unchanged
The corruption and its consequences are confined to the kernel's own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.
C:HConfidentiality impact, high
The freed kmalloc-64 `tcp_transport` can be reclaimed with attacker-controlled data and its `ops` field is dereferenced, which combined with the indirect call yields arbitrary kernel memory disclosure; the already-released socket is also reused.
I:HIntegrity impact, high
`ksmbd_conn_write()` reads the `ops` vtable pointer out of the freed object and indirectly calls `ops->writev`, giving a direct control-flow hijack primitive and hence arbitrary kernel code execution after heap spraying.
A:HAvailability impact, high
Even unweaponized, dereferencing the freed transport and the released socket reliably oopses or panics the kernel, and the attacker can trigger it repeatedly to keep the server down.