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

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

CVE-2025-37776

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

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-37776 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.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

There is a room in smb_break_all_levII_oplock that can cause racy issues when unlocking in the middle of the loop. This patch use read lock to protect whole loop.

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
fs/smb/server/oplock.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.35%, higher than 27.6% 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.88296cb5457cc6
5.156.12.25d54ab1520d43
5.156.14.4d73686367ad6
5.156.1518b4fac5ef17

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 on TCP/445, and every trigger path (SMB2 WRITE, CREATE with O_TRUNC, SET_INFO alloc-size/rename, IOCTL copychunk/zero-data, LOCK) is driven entirely by remote SMB2 traffic. No local access is required.
AC:LAttack complexity, low
The attacker controls both sides of the race: one connection holds the level-II oplock and simply withholds the SMB2_OPLOCK_BREAK ack, pinning the RCU-unlocked window open for up to OPLOCK_WAIT_TIME (35 s), while other connections close handles on the same inode to drive opinfo_del()/opinfo_put(). An attacker-created race with a multi-second window is reliably winnable and repeatable.
PR:LPrivileges required, low
All call sites dereference work->tcon->share_conf, so a completed SESSION_SETUP and TREE_CONNECT are needed — any unprivileged share account (including guest where "map to guest" is configured) suffices, with no administrative rights. This matches the sibling post-authentication ksmbd UAFs.
UI:NUser interaction, none
The attacker drives every step from its own SMB connections — taking the oplock, stalling the break ack, and closing handles concurrently. No action by an administrator or any other client is needed.
S:UScope, unchanged
The freed object and the resulting corruption are both inside the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
The ~176-byte oplock_info lives in the general kmalloc-192 cache and is remotely sprayable, so the freed object can be reclaimed with attacker-controlled bytes at the op_entry.next offset, yielding a chosen brk_op whose ->conn and ->o_lease->state dereferences give arbitrary kernel memory disclosure.
I:HIntegrity impact, high
With a controlled brk_op pointer, atomic_inc_not_zero(&brk_op->refcount) is an arbitrary-address increment write, and oplock_break() then manipulates wait-queue lists and queues work off the fake object — a use-after-free that is exploitable for control-flow hijack and arbitrary kernel code execution.
A:HAvailability impact, high
Even unweaponized, following op_entry.next out of a freed oplock_info dereferences freed/poisoned memory and reliably oopses or panics the kernel, and the attacker can repeat the sequence to keep the SMB server down.