Skip to contentSkip to conversation

CVE-2026-90152: smb/server: fix session leak in ksmbd_session_register()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

smb/server: fix session leak in ksmbd_session_register()

See the procedure below:

smb2_sess_setup

    ksmbd_smb2_session_create
      __session_create
        atomic_set(&sess->refcnt, 2)
        hash_add(sessions_table, &sess->hlist, sess->id)
    ksmbd_session_register
      xa_store(&conn->sessions, sess->id, sess) // fail
    ksmbd_user_session_put
      atomic_dec(&sess->refcnt) // refcnt is 1, session is not freed

Remove the session from sessions_table and drop its table reference if xa_store() fails.

The Linux kernel CVE team has assigned CVE-2026-90152 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.4 with commit f5c779b7ddbda30866cf2a27c63e34158f858c73 and fixed in 6.12.110 with commit 03a22a003f41b182245e6c71fe565e277cff7094
	Issue introduced in 6.4 with commit f5c779b7ddbda30866cf2a27c63e34158f858c73 and fixed in 6.18.52 with commit b967a595fb735d313a8676b2ca6a4cba38506482
	Issue introduced in 6.4 with commit f5c779b7ddbda30866cf2a27c63e34158f858c73 and fixed in 7.2.6 with commit 55c677619084f9c9fa4146d933cc8ccafc924c87
	Issue introduced in 6.4 with commit f5c779b7ddbda30866cf2a27c63e34158f858c73 and fixed in 7.3-rc1 with commit 99b25b046e47e4904373cfeb445c5483f1633d88
	Issue introduced in 5.15.145 with commit 708c304b583d789957399dd8237f212cf8ad1e4d
	Issue introduced in 6.1.29 with commit f623f627ad2b1dc215ab3b0df53fb05cfd3a1c3b
	Issue introduced in 6.2.16 with commit d270631c21e68fb8016d6e231d022d7023a2df6f
	Issue introduced in 6.3.2 with commit 02f41d88f15d6b7d523e52cc3f87488f57e9265b

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-90152

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

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/03a22a003f41b182245e6c71fe565e277cff7094
	https://git.kernel.org/stable/c/b967a595fb735d313a8676b2ca6a4cba38506482
	https://git.kernel.org/stable/c/55c677619084f9c9fa4146d933cc8ccafc924c87
	https://git.kernel.org/stable/c/99b25b046e47e4904373cfeb445c5483f1633d88