Subject: CVE-2024-39468: smb: client: fix deadlock in smb2_find_smb_tcon()

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

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

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

smb: client: fix deadlock in smb2_find_smb_tcon()

Unlock cifs_tcp_ses_lock before calling cifs_put_smb_ses() to avoid such
deadlock.

The Linux kernel CVE team has assigned CVE-2024-39468 to this issue.

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

	Fixed in 5.10.221 with commit b055752675cd
	Fixed in 5.15.162 with commit 21f5dd36e655
	Fixed in 6.1.94 with commit b09b556e4896
	Fixed in 6.6.34 with commit 225de871ddf9
	Fixed in 6.9.5 with commit 8d0f5f1ccf67
	Fixed in 6.10 with commit 02c418774f76

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-2024-39468
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/client/smb2transport.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/b055752675cd1d1db4ac9c2750db3dc3e89ea261
	https://git.kernel.org/stable/c/21f5dd36e655d25a7b45b61c1e537198b671f720
	https://git.kernel.org/stable/c/b09b556e48968317887a11243a5331a7bc00ece5
	https://git.kernel.org/stable/c/225de871ddf994f69a57f035709cad9c0ab8615a
	https://git.kernel.org/stable/c/8d0f5f1ccf675454a833a573c53830a49b7d1a47
	https://git.kernel.org/stable/c/02c418774f76a0a36a6195c9dbf8971eb4130a15