Skip to contentSkip to conversation

CVE-2025-37926: ksmbd: fix use-after-free in ksmbd_session_rpc_open

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 20, 2025

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 use-after-free in ksmbd_session_rpc_open

A UAF issue can occur due to a race condition between ksmbd_session_rpc_open() and __session_rpc_close(). Add rpc_lock to the session to protect it.

The Linux kernel CVE team has assigned CVE-2025-37926 to this issue.

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

	Fixed in 6.12.28 with commit 8fb3b6c85b7e3127161623586b62abcc366caa20
	Fixed in 6.14.6 with commit 6323fec65fe54b365961fed260dd579191e46121
	Fixed in 6.15-rc5 with commit a1f46c99d9ea411f9bf30025b912d881d36fc709

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-2025-37926

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/mgmt/user_session.c
fs/smb/server/mgmt/user_session.h

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/8fb3b6c85b7e3127161623586b62abcc366caa20
	https://git.kernel.org/stable/c/6323fec65fe54b365961fed260dd579191e46121
	https://git.kernel.org/stable/c/a1f46c99d9ea411f9bf30025b912d881d36fc709