Skip to contentSkip to conversation

CVE-2026-98162: smb/server: fix tree connection leak in smb2_tree_connect()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

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 tree connection leak in smb2_tree_connect()

See the procedure below:

smb2_tree_connect
ksmbd_tree_conn_connect
xa_store(&sess->tree_conns, tree_conn->id, tree_conn) ksmbd_counter_inc(KSMBD_COUNTER_TREE_CONNS) ksmbd_share_tree_conn_inc(sc)
ksmbd_iov_pin_rsp // fail
status.ret = KSMBD_TREE_CONN_STATUS_NOMEM
// do not disconnect tree_conn

Disconnect the new tree connection if ksmbd_iov_pin_rsp() fails.

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

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

	Issue introduced in 6.6 with commit e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d and fixed in 7.2.6 with commit a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc
	Issue introduced in 6.6 with commit e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d and fixed in 7.3-rc1 with commit 39f2032096715daae5f6fd0f587ca7a474b019df
	Issue introduced in 5.15.145 with commit f2283680a80571ca82d710bc6ecd8f8beac67d63
	Issue introduced in 6.1.71 with commit 9f297df20d93411c0b4ddad7f88ba04a7cd36e77

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

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/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/a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc
	https://git.kernel.org/stable/c/39f2032096715daae5f6fd0f587ca7a474b019df