CVE-2026-68431: ksmbd: validate minimum PDU size for transform requests

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081254-CVE-2026-68431-12d7@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

ksmbd: validate minimum PDU size for transform requests

The receive path applies the minimum SMB2 PDU size check only when
ProtocolId is SMB2_PROTO_NUMBER. A packet carrying
SMB2_TRANSFORM_PROTO_NUM bypasses the check even when the negotiated
dialect does not provide transform handling.

On an SMB 2.1 connection, a short transform packet therefore reaches
init_smb2_rsp_hdr(), which interprets the request as a full SMB2 header
and reads beyond the request allocation. The copied fields can then be
returned to the unauthenticated client.

Compression transforms are converted to ordinary SMB2 messages before
protocol validation. After that conversion, validate ordinary SMB2
requests against SMB2_MIN_SUPPORTED_PDU_SIZE and require encryption
transform requests to contain both a transform header and an SMB2
header. This rejects truncated requests before work allocation.

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


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

	Issue introduced in 6.4 with commit 368ba06881c395f1c9a7ba22203cf8d78b4addc0 and fixed in 7.1.6 with commit b62c510f59803f82f9b4c76ead2a56833b2984c7
	Issue introduced in 6.4 with commit 368ba06881c395f1c9a7ba22203cf8d78b4addc0 and fixed in 7.2-rc5 with commit cfc0b8e5080aec87700774e8568765eaa4b7b92b
	Issue introduced in 5.15.145 with commit df3a4518aee64f21bcafa891105b468413f27431
	Issue introduced in 6.1.34 with commit 543c12c2644e772caa6880662c2a852cfdc5a10c
	Issue introduced in 6.3.8 with commit e9cb7be2fcbaee9e808b729e92948d38d52e5add

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-68431
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/connection.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/b62c510f59803f82f9b4c76ead2a56833b2984c7
	https://git.kernel.org/stable/c/cfc0b8e5080aec87700774e8568765eaa4b7b92b
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.