Skip to contentSkip to conversation

CVE-2026-43185: ksmbd: fix signededness bug in smb_direct_prepare_negotiation()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 6

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 signededness bug in smb_direct_prepare_negotiation()

smb_direct_prepare_negotiation() casts an unsigned __u32 value from sp->max_recv_size and req->preferred_send_size to a signed int before computing min_t(int, ...). A maliciously provided preferred_send_size of 0x80000000 will return as smaller than max_recv_size, and then be used to set the maximum allowed alowed receive size for the next message.

By sending a second message with a large value (>1420 bytes) the attacker can then achieve a heap buffer overflow.

This fix replaces min_t(int, ...) with min_t(u32)

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

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

	Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.18.16 with commit ceae058eb707ddd0d68f0872f9d9f23b7c30c37b
	Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.19.6 with commit 55abc475d096da4a5356b6efb0cfdc6156bc1550
	Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 7.0 with commit 6b4f875aac344cdd52a1f34cc70ed2f874a65757

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

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/transport_rdma.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/ceae058eb707ddd0d68f0872f9d9f23b7c30c37b
	https://git.kernel.org/stable/c/55abc475d096da4a5356b6efb0cfdc6156bc1550
	https://git.kernel.org/stable/c/6b4f875aac344cdd52a1f34cc70ed2f874a65757