Skip to contentSkip to conversation

CVE-2025-68817: ksmbd: fix use-after-free in ksmbd_tree_connect_put under concurrency

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 13

lore
Share & tools
lore
#0 lore raw

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

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

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

ksmbd: fix use-after-free in ksmbd_tree_connect_put under concurrency

Under high concurrency, A tree-connection object (tcon) is freed on a disconnect path while another path still holds a reference and later executes *_put()/write on it.

The Linux kernel CVE team has assigned CVE-2025-68817 to this issue.

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

	Fixed in 6.1.160 with commit d092de8a26c952379ded8e6b0bda31d89befac1a
	Fixed in 6.6.120 with commit d64977495e44855f2b28d8ce56107c963a7a50e4
	Fixed in 6.12.64 with commit 21a3d01fc6db5129f81edb0ab7cb94fd758bcbea
	Fixed in 6.18.3 with commit 063cbbc6f595ea36ad146e1b7d2af820894beb21
	Fixed in 6.19-rc1 with commit b39a1833cc4a2755b02603eec3a71a85e9dff926

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-2025-68817

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/tree_connect.c
fs/smb/server/mgmt/tree_connect.h
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/d092de8a26c952379ded8e6b0bda31d89befac1a
	https://git.kernel.org/stable/c/d64977495e44855f2b28d8ce56107c963a7a50e4
	https://git.kernel.org/stable/c/21a3d01fc6db5129f81edb0ab7cb94fd758bcbea
	https://git.kernel.org/stable/c/063cbbc6f595ea36ad146e1b7d2af820894beb21
	https://git.kernel.org/stable/c/b39a1833cc4a2755b02603eec3a71a85e9dff926