Subject: CVE-2024-26594: ksmbd: validate mech token in session setup

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

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

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

ksmbd: validate mech token in session setup

If client send invalid mech token in session setup request, ksmbd
validate and make the error if it is invalid.

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

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

	Fixed in 5.15.149 with commit dd1de9268745
	Fixed in 6.1.75 with commit 6eb8015492bc
	Fixed in 6.6.14 with commit a2b21ef1ea4c
	Fixed in 6.7.2 with commit 5e6dfec95833
	Fixed in 6.8 with commit 92e470163d96

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-26594
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/asn1.c
	fs/smb/server/connection.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/dd1de9268745f0eac83a430db7afc32cbd62e84b
	https://git.kernel.org/stable/c/6eb8015492bcc84e40646390e50a862b2c0529c9
	https://git.kernel.org/stable/c/a2b21ef1ea4cf632d19b3a7cc4d4245b8e63202a
	https://git.kernel.org/stable/c/5e6dfec95833edc54c48605a98365a7325e5541e
	https://git.kernel.org/stable/c/92e470163d96df8db6c4fa0f484e4a229edb903d