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

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

CVE-2026-64396

ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation

8.8 EPSS 0.4% AV:N

Published 2026-07-25 (3 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-2026-64396 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 12bookwormfixedDLA-4720-1 · 2026-08-05 · text6.1.180-1Update the kernel and reboot. DLA-4720-1 shipped the fix on 2026-08-05, in 6.1.180-1. A running kernel keeps the old code until the machine restarts.
Debian 13trixiefixed6.12.96-1Update the kernel and reboot. Fixed in 6.12.96-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed7.1.4-1Update the kernel and reboot. Fixed in 7.1.4-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.1.4-1Update the kernel and reboot. Fixed in 7.1.4-1. A running kernel keeps the old code until the machine restarts.
Debian 12bookworm · linux-6.12fixedDLA-4724-1 · 2026-08-07 · text6.12.100-1~deb12u1Update the kernel and reboot. DLA-4724-1 shipped the fix on 2026-08-07, in 6.12.100-1~deb12u1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

When a blocking byte-range lock request is deferred in the FILE_LOCK_DEFERRED path, ksmbd registers the asynchronous work into the connection's async_requests list via setup_async_work(). The cancel callback smb2_remove_blocked_lock() holds a reference to the flock. If the lock waiter is subsequently woken up but the work state is no longer KSMBD_WORK_ACTIVE (e.g., due to a concurrent cancellation), the cleanup path calls locks_free_lock(flock) without dequeuing the work from the async_requests list. Concurrently, smb2_cancel() walks the list under conn->request_lock and invokes the cancel callback, which then dereferences the already freed 'flock'. This leads to a slab-use-after-free inside __wake_up_common. Fix this by restructuring the cleanup logic after the worker returns from ksmbd_vfs_posix_lock_wait(). Move list_del(&smb_lock->llist) and release_async_work(work) to the top of the cleanup block. This guarantees that the async work is completely dequeued and serialized under conn->request_lock before locks_free_lock(flock) is called, rendering the flock unreachable for any concurrent smb2_cancel().

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, sid, bookworm · linux-6.12m
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-07-25 (3 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.43%, higher than 36.3% 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.1.178367c42a611fe
5.156.6.1457703fd9aba1f
5.156.12.96463bbd796985
5.156.18.395aa1cb01155f
5.157.1.45c75275c0fc9
5.157.2d20d1c8ba576

Debian advisories

AdvisoryDateShipped toDebian
DLA-4724-12026-08-07bookworm 6.12.100-1~deb12u1tracker
DLA-4723-12026-08-07bullseye 6.1.180-1~deb11u1tracker
DLA-4720-12026-08-05bookworm 6.1.180-1tracker

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 accepts remote SMB traffic over TCP port 445, and SMB2 LOCK, CLOSE, and CANCEL requests reach the vulnerable code through the network handler.
AC:LAttack complexity, low
The attacker can create both conflicting file handles, obtain the deferred request's AsyncId, and control the CLOSE/CANCEL sequencing, so both sides of the race are attacker-controlled.
PR:LPrivileges required, low
SMB2 LOCK requires a valid SMB session, tree connection, and session-owned open file handle. Any ordinary authenticated share user suffices; administrative privileges are unnecessary.
UI:NUser interaction, none
The attacker can create the handles, conflicting locks, and cancellation requests without any victim action.
S:UScope, unchanged
The UAF occurs within the host kernel's ksmbd security authority and does not inherently cross a separate virtualization or sandbox boundary.
C:HConfidentiality impact, high
The file_lock UAF permits attacker-influenced slab reuse and stale kernel-pointer dereferences, making kernel memory disclosure defensible.
I:HIntegrity impact, high
The stale callback performs list deletion and wait-queue operations through freed or reallocated fields, enabling kernel heap corruption, arbitrary-write primitives, and potential code execution.
A:HAvailability impact, high
The UAF reaches __locks_delete_block or __wake_up_common and can cause a kernel oops or panic; a remote attacker can repeatedly retrigger it.