CVE-2026-99277: ksmbd: hold a connection reference for each session channel
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: hold a connection reference for each session channel
ksmbd_session_unregister() removes a session from the global and per- connection tables before dropping the table reference. A concurrent reference holder can keep the session and its channel list alive after those removals.
Connection cleanup can no longer find the unpublished session to remove its channels. Since a channel only stores a raw conn pointer, the connection can be freed while another session reference holder is still accessing it, for example during SMB3.1.1 binding or a procfs read.
Take a connection reference when registering a channel and release it on insertion failure, channel removal, or final session destruction. Keep the channels and signing keys until the session is destroyed so a response can still be signed after the session has been unregistered.
The Linux kernel CVE team has assigned CVE-2026-99277 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.3 with commit d7fd1f98607f2cd358e583f9548bdf0173090a86 and fixed in 7.3.2 with commit 4b333aed69cfc2c8687b86b6a4364a0dffc16dd8 Issue introduced in 7.3 with commit d7fd1f98607f2cd358e583f9548bdf0173090a86 and fixed in 7.4-rc1 with commit add8d7fb04efe564193df73581889c62fc0016f1 Issue introduced in 7.2.8 with commit c99ea7855124ca1428a1e59c2b4590aaef34eacf
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99277
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/smb/server/mgmt/user_session.c
fs/smb/server/smb2pdu.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/4b333aed69cfc2c8687b86b6a4364a0dffc16dd8 https://git.kernel.org/stable/c/add8d7fb04efe564193df73581889c62fc0016f1