Skip to contentSkip to conversation

CVE-2025-40168: smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 12, 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:

smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().

smc_clc_prfx_match() is called from smc_listen_work() and not under RCU nor RTNL.

Using sk_dst_get(sk)->dev could trigger UAF.

Let's use __sk_dst_get() and dst_dev_rcu().

Note that the returned value of smc_clc_prfx_match() is not used in the caller.

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

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

	Issue introduced in 4.11 with commit a046d57da19f812216f393e7c535f5858f793ac3 and fixed in 6.17.3 with commit d26e80f7fb62d77757b67a1b94e4ac756bc9c658
	Issue introduced in 4.11 with commit a046d57da19f812216f393e7c535f5858f793ac3 and fixed in 6.18-rc1 with commit 235f81045c008169cc4e1955b4a64e118eebe61b

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

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:
net/smc/smc_clc.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/d26e80f7fb62d77757b67a1b94e4ac756bc9c658
	https://git.kernel.org/stable/c/235f81045c008169cc4e1955b4a64e118eebe61b