KernelScan.io

HIGH

smb/server RpcSession Leak

CVE-2025-71220

CVSS 7.8 / 10.0 NVD

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

KernelScan AI6.5MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe() When ksmbd_iov_pin_rsp() fails, we should call ksmbd_session_rpc_close().

02

Engine v0.2.0

Risk summary

SMB clients can cause resource exhaustion by triggering RPC session leaks in the ksmbd server. Repeated exploitation can lead to denial of service by consuming all available RPC sessions. This affects systems running ksmbd SMB server with network-accessible SMB shares.

Affectedfs/smb/server/smb2pdu.c (ksmbd SMB server)

Vulnerability analysis

The vulnerability exists in the create_smb2_pipe() function where RPC sessions opened for named pipe operations are not properly cleaned up when ksmbd_iov_pin_rsp() fails. The original code would return immediately on this error without calling ksmbd_session_rpc_close(), causing RPC sessions to leak. The fix initializes the session ID to -1 and adds proper cleanup logic to close RPC sessions on error paths. This is reachable from network via SMB protocol and requires only SMB client authentication.

03

BranchFixed inPatch commit
5.155.15.200a2c68e256fb7
6.16.1.1632b7b4df87fe6
6.126.12.70ac18761b530b
6.186.18.10fdda836fcee6
6.66.6.12404dd114b682a
mainline6.197c28f8eef5ac