KernelScan.io

HIGH

smb RecvCredit Race

CVE-2026-31538

CVSS 7.5 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

KernelScan AI5.9MEDIUM

01

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.

02

Engine v0.2.0

Risk summary

A race condition in SMB Direct credit management could cause connection failures and server instability. The vulnerability affects systems running SMB servers with RDMA support enabled, potentially causing denial of service when authenticated clients connect over SMB Direct.

Affectedfs/smb/server/transport_rdma.c (SMB server RDMA transport)

Vulnerability analysis

The vulnerability stems from a race condition in the SMB Direct (RDMA) credit management system. The original code calculated available credits by subtracting granted credits from posted receive buffers, but there's a timing window between hardware packet reception and software completion processing where peers may consume credits that the server hasn't accounted for yet. This could lead to granting non-existent credits, corrupting the credit accounting protocol. The fix introduces a dedicated atomic counter for available credits that is incremented when buffers are posted and atomically drained when credits are granted, eliminating the race condition. The attack surface is network-facing SMB servers with RDMA support enabled.

03

BranchFixed inPatch commit
6.186.18.1166c082e3d465
6.196.19.1809cbd31aa4f
mainline7.026ad87a2cfb8