CVE-2026-90152: smb/server: fix session leak in ksmbd_session_register()
In the Linux kernel, the following vulnerability has been resolved:
smb/server: fix session leak in ksmbdsessionregister()
See the procedure below:
smb2sesssetup ksmbdsmb2sessioncreate sessioncreate atomicset(&sess->refcnt, 2) hashadd(sessionstable, &sess->hlist, sess->id) ksmbdsessionregister xastore(&conn->sessions, sess->id, sess) // fail ksmbdusersessionput atomicdec(&sess->refcnt) // refcnt is 1, session is not freed
Remove the session from sessionstable and drop its table reference if xastore() fails.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.111-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.6-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.111-1~deb12u1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.110 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.52 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In ksmbd_session_register(), when xa_store(&conn->sessions, sess->id, sess) fails, remove the session from sessions_table and drop its table reference to prevent the session leak.
Event History
Frequently Asked Questions
What condition triggers the leaked session?
The leak occurs when ksmbd_session_register() calls xa_store() for a newly created SMB2 session and xa_store() fails. The session has already been added to sessions_table, and the failure path drops only one reference, leaving the table reference and the session allocated.
Which component is affected?
The affected component is the Linux kernel SMB server, ksmbd. The issue is in the SMB2 session-setup path.
What does the fix change?
The fix removes the session from sessions_table and drops its table reference when xa_store() fails, allowing the session to be freed.