Skip to contentSkip to conversation

CVE-2026-31538: smb: server: make use of smbdirect_socket.recv_io.credits.available

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 24

lore
Share & tools
lore
#0 lore raw

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

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

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

smb: server: make use of smbdirect_socket.recv_io.credits.available

The logic off managing recv credits by counting posted recv_io and granted credits is racy.

That's because the peer might already consumed a credit, but between receiving the incoming recv at the hardware and processing the completion in the 'recv_done' functions we likely have a window where we grant credits, which don't really exist.

So we better have a decicated counter for the
available credits, which will be incremented
when we posted new recv buffers and drained when
we grant the credits to the peer.

This fixes regression Namjae reported with
the 6.18 release.

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

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

	Issue introduced in 6.18 with commit 89b021a72663c4d96d8a8b85272bb42d991a1c6f and fixed in 6.18.11 with commit 66c082e3d4651e8629a393a9e182b01eb50fb0a3
	Issue introduced in 6.18 with commit 89b021a72663c4d96d8a8b85272bb42d991a1c6f and fixed in 6.19.1 with commit 809cbd31aa4f87a1b889532244c9cf30eb022385
	Issue introduced in 6.18 with commit 89b021a72663c4d96d8a8b85272bb42d991a1c6f and fixed in 7.0 with commit 26ad87a2cfb8c1384620d1693a166ed87303046e

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

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/66c082e3d4651e8629a393a9e182b01eb50fb0a3
	https://git.kernel.org/stable/c/809cbd31aa4f87a1b889532244c9cf30eb022385
	https://git.kernel.org/stable/c/26ad87a2cfb8c1384620d1693a166ed87303046e