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

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

CVE-2026-89635

ksmbd: only rebind the reopened file's own oplock on durable reconnect

9.8 EPSS 0.6% AV:N

Published 2026-09-11 (37 days ago) by the Linux kernel CNA. Subsystem fs/smb. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2026-89635 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 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixienot affected6.12.113-1Nothing to do. trixie never shipped the vulnerable code.
Debian 14forkynot affected7.2.11-1Nothing to do. forky never shipped the vulnerable code.
Debian unstablesidnot affected7.2.11-1Nothing to do. sid never shipped the vulnerable code.

The vulnerability

What the bug is

ksmbd_reopen_durable_fd() walks the inode's m_op_list and rebinds every detached oplock to the reconnecting session: list_for_each_entry_rcu(op, &ci->m_op_list, op_entry, lockdep_is_held(&ci->m_lock)) { if (op->conn) continue; op->conn = ksmbd_conn_get(fp->conn); op->sess = work->sess; } The only key is op->conn == NULL, which every detached durable handle on that inode matches, not just the one owned by fp. When two sessions hold durable handles on the same file and both disconnect, reconnecting one of them adopts the other session's oplock: op->sess is overwritten with the reconnecting session without taking a reference on it, while op->conn pins the connection. The sibling teardown path, session_fd_check(), keys on the identity of the connection being torn down (op->conn == conn) rather than on shared state, and so does not have this problem. Once the adopting session is destroyed, ksmbd_session_destroy() frees it while the foreign oplock still points at it. The reader in ksmbd_close_fd_app_instance_id() validates only opinfo->conn, which is still live thanks to the reference taken above, and then dereferences the stale session: if (!opinfo->conn) { up_read(&fp->f_ci->m_lock); goto out; } ft = &opinfo->sess->file_table; write_lock(&ft->lock); BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0 Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9 Workqueue: ksmbd-io handle_ksmbd_work Call Trace: _raw_write_lock+0x74/0xd0 ksmbd_close_fd_app_instance_id+0x183/0x410 smb2_open+0x1346/0x4430 handle_ksmbd_work+0x2bb/0x7b0 Reached from an authenticated session against a share with the default durable-handle and oplock configuration: two sessions open the same file with a durable-v2 handle and an RH lease under distinct AppInstanceIds, both log off, one reconnects with DH2C, and a later durable-v2 create carrying the other AppInstanceId walks into the freed session. Constrain the loop to the oplock owned by the file being reopened.

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
2026-09-11 (37 days ago)source
CVSS
9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
network (AV:N)source
EPSS
0.55%, higher than 45.0% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
fs/smb

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
7.27.2.474e3ef4630f0
7.27.33f220a0a62e6

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; the UAF is reached from remote SMB2 CREATE (DH2C durable reconnect, then a later AppInstanceId create) via ksmbd_conn_handler_loop() through handle_ksmbd_work(), smb2_open(), ksmbd_reopen_durable_fd(), and ksmbd_close_fd_app_instance_id().
AC:LAttack complexity, low
The attacker fully drives both sessions: open the same file with durable-v2 RH leases and distinct AppInstanceIds, log off both, reconnect one with DH2C (misbinding the sibling oplock), destroy that session, then CREATE with the other AppInstanceId. No victim-dependent race, heap layout, or rare kernel config is required.
PR:NPrivileges required, none
SMB2 CREATE needs a session and tree connect, but ksmbd supports guest/anonymous users and guest shares; guest session setup skips NTLMSSP password verification, so a reasonable NAS/IoT deployment lets an unauthenticated network client reach this path without a named account.
UI:NUser interaction, none
No victim action is required; the attacker programmatically issues SESSION_SETUP, TREE_CONNECT, CREATE, LOGOFF, DH2C reconnect, and the follow-up AppInstanceId CREATE on their own SMB connections.
S:UScope, unchanged
The UAF corrupts ksmbd/kernel heap on the SMB server host and can escalate privileges within that kernel; it does not cross a VM, guest-to-host, container, or IOMMU/DMA security boundary.
C:HConfidentiality impact, high
Use-after-free of a ksmbd_session object: after the adopted session is kfree'd in ksmbd_session_destroy(), ksmbd_close_fd_app_instance_id() still sees a live opinfo->conn and dereferences the stale opinfo->sess, enabling arbitrary kernel disclosure via heap reuse.
I:HIntegrity impact, high
The UAF takes write_lock on the freed session's file_table.lock (KASAN 4-byte write) and may idr_remove through the stale table; with heap spray this yields arbitrary kernel writes and control-flow hijacking, matching High integrity for session-object UAF.
A:HAvailability impact, high
KASAN reports slab-use-after-free in _raw_write_lock from ksmbd_close_fd_app_instance_id during smb2_open on ksmbd-io; the dangling session pointer causes kernel oops or panic on worker threads and is repeatable by resending the CREATE sequence.