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

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

CVE-2025-37802

ksmbd: fix WARNING "do not call blocking ops when !TASK_RUNNING"

7.5 EPSS 0.4% AV:N

Published 2025-05-08 (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-37802 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

wait_event_timeout() will set the state of the current task to TASK_UNINTERRUPTIBLE, before doing the condition check. This means that ksmbd_durable_scavenger_alive() will try to acquire the mutex while already in a sleeping state. The scheduler warns us by giving the following warning: do not call blocking ops when !TASK_RUNNING; state=2 set at [<0000000061515a6f>] prepare_to_wait_event+0x9f/0x6c0 WARNING: CPU: 2 PID: 4147 at kernel/sched/core.c:10099 __might_sleep+0x12f/0x160 mutex lock is not needed in ksmbd_durable_scavenger_alive().

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/vfs_cache.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-05-08 (17 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.36%, higher than 28.0% 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.15797aabdbf7ba8
5.156.12.268f805b3746d2
5.156.14.5cd161198e091
5.156.151df0d4c61613

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 the trigger is SMB2 SESSION_SETUP / connection teardown traffic from a remote peer. No local access is needed.
AC:LAttack complexity, low
The scavenger kthread hits the bad `mutex_lock()`-under-TASK_UNINTERRUPTIBLE on its very first wait, deterministically, whenever a session is destroyed while a durable handle exists; the attacker also controls both sides of the lock contention by churning sessions across parallel connections.
PR:NPrivileges required, none
`ksmbd_session_destroy()` — which launches the scavenger — is reached before authentication, via `ksmbd_session_register()`→`ksmbd_expire_session()` reaping a non-VALID (unauthenticated) session and via `ksmbd_sessions_deregister()` on connection close; on guest-mapped shares the attacker can also populate the durable-handle table with no credentials.
UI:NUser interaction, none
Exploitation requires only that the attacker open SMB connections and issue SESSION_SETUP requests; no action by a local user or administrator is needed.
S:UScope, unchanged
The corrupted task state and the resulting warning/spin are confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:NConfidentiality impact, none
There is no out-of-bounds read or use-after-free; the WARN backtrace goes to the kernel log, which is not accessible to the remote attacker.
I:NIntegrity impact, none
No memory corruption or data modification occurs — the only state damaged is the scavenger kthread's own scheduler state, which does not yield a write primitive.
A:HAvailability impact, high
The bug produces a kernel WARNING splat that becomes a full panic under `panic_on_warn`, and the clobbered task state turns the scavenger into a busy loop repeatedly holding `write_lock(&global_ft.lock)`, exhausting a CPU and stalling all SMB file open/close processing.