CVE-2026-23228: smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection()
On kthread_run() failure in ksmbd_tcp_new_connection(), the transport is freed via free_transport(), which does not decrement active_num_conn, leaking this counter.
Replace free_transport() with ksmbd_tcp_disconnect().
The Linux kernel CVE team has assigned CVE-2026-23228 to this issue.
Affected and fixed versions
===========================
Fixed in 6.6.125 with commit 787769c8cc50416af7b8b1a36e6bcd6aaa7680aa Fixed in 6.12.72 with commit baf664fc90a6139a39a58333e4aaa390c10d45dc Fixed in 6.18.11 with commit cd25e0d809531a67e9dd53b19012d27d2b13425f Fixed in 6.19.1 with commit 599271110c35f6b16e2e4e45b9fbd47ed378c982
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-23228
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/transport_tcp.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/787769c8cc50416af7b8b1a36e6bcd6aaa7680aa https://git.kernel.org/stable/c/baf664fc90a6139a39a58333e4aaa390c10d45dc https://git.kernel.org/stable/c/cd25e0d809531a67e9dd53b19012d27d2b13425f https://git.kernel.org/stable/c/599271110c35f6b16e2e4e45b9fbd47ed378c982 https://git.kernel.org/stable/c/77ffbcac4e569566d0092d5f22627dfc0896b553