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

Look up another CVE · open CVE-2026-90162 in the interactive tracker

CVE-2026-90162

ksmbd: defer publishing granted locks to prevent UAF/double-free race

8.8 EPSS 0.6% AV:N

Published 2026-09-17 (31 days 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-2026-90162 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 13trixievulnerable6.12.113-1No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication.
Debian 14forkyfixed7.2.6-1Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.2.6-1Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

In smb2_lock(), mid-batch granted locks are published to connection-wide (conn->lock_list) and file-wide (fp->lock_list) lists immediately upon vfs_lock_file() success, while also remaining tracked on the stack-local rollback_list. If a subsequent element in the same SMB2_LOCK request array fails validation or execution, the thread jumps to out: and walks rollback_list to undo previously granted locks. However, because the granted lock was already published to conn->lock_list, a concurrent UNLOCK request on the same connection can find the lock object and kfree() it before the rollback loop executes. When the granting thread subsequently walks rollback_list, it dereferences and frees the already-freed ksmbd_lock structure, resulting in a Use-After-Free and Double-Free (on both ksmbd_lock and struct file_lock). Fix this by deferring the publication of granted locks to conn->lock_list and fp->lock_list until after the entire array of lock elements has been processed without error. Mid-batch grants remain tracked exclusively on the request-local rollback_list until the whole batch succeeds, eliminating the race window.

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/smb2pdu.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
2026-09-17 (31 days 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.63%, higher than 49.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.18.57ff6870cf3b7e
5.157.2.6a1d26dfb3291
5.157.329f74f0f2e6d

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 attacker-controlled data is the SMB2 LOCK request (struct smb2_lock_req lock elements: Offset, Length, Flags) received on TCP/445 by ksmbd_conn_handler_loop(), queued with queue_ksmbd_work(), and dispatched to smb2_lock() via conn->cmds[SMB2_LOCK_HE]; the racing free is a second SMB2 LOCK with SMB2_LOCKFLAG_UNLOCK on the same FID.
AC:LAttack complexity, low
The attacker drives both sides: smb2_lock() publishes a granted ksmbd_lock onto conn->lock_list after vfs_lock_file() succeeds for lock element 0, then a later element in the same LockCount>1 array fails (cmd<0, missing SMB2_LOCKFLAG_MASK, or overlap) and walks rollback_list, while a concurrent SMB2 LOCK UNLOCK on ksmbd-io (WQ_PERCPU) kfree()s that object; the race is retryable.
PR:LPrivileges required, low
SMB2_LOCK is not in the smb2_check_user_session() pre-auth skip list (only NEGOTIATE/SESSION_SETUP/ECHO); it requires SMB2_SESSION_VALID, smb2_get_ksmbd_tcon() for a tree id, and ksmbd_lookup_fd_slow() after smb2_open(). An ordinary authenticated share user suffices; this is not a pre-auth handshake.
UI:NUser interaction, none
The attacker completes SESSION_SETUP, TREE_CONNECT and CREATE on their own ksmbd TCP connection, then sends the multi-element SMB2 LOCK and concurrent UNLOCK; no victim mount, click, or administrator action is required.
S:UScope, unchanged
The UAF and double-free of ksmbd_lock and struct file_lock occur in the ksmbd-io worker on the host that accepted the SMB session and do not cross a VM, guest-to-host, or IOMMU/DMA boundary.
C:HConfidentiality impact, high
UNLOCK's kfree(cmp_lock) leaves rollback reading smb_lock->start, smb_lock->end, smb_lock->conn and smb_lock->fl from a freed ksmbd_lock; reclaiming that slab or the associated file_lock_cache object with attacker-controlled contents yields an arbitrary kernel read.
I:HIntegrity impact, high
The same rollback path list_del()s smb_lock->flist and smb_lock->clist on the freed object, then locks_free_lock(smb_lock->fl) and kfree(smb_lock) after UNLOCK already freed both, giving a double-free and list_del write primitive for heap corruption and control-flow hijack.
A:HAvailability impact, high
Dereferencing the freed ksmbd_lock (including spin_lock on smb_lock->conn->llist_lock) and double-freeing ksmbd_lock/file_lock oops or panic the ksmbd-io worker; the LOCK/UNLOCK pair can be repeated to crash the host.