CVE Database›CVE-2025-40139

CVE-2025-40139

kernel: smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set()

Loading…

Severity

Moderate

Red Hat Product Security

4.7

CVSS 3.1

Review impact separately from score.

Published · November 12, 2025

Updated · July 30, 2026

Description

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

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

smc_clc_prfx_set() is called during connect() and not under RCU nor RTNL.

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

Let's use __sk_dst_get() and dev_dst_rcu() under rcu_read_lock() after kernel_getsockname().

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

While at it, we change the 1st arg of smc_clc_prfx_set[46]_rcu() not to touch dst there.

Statement

The CLC prefix-selection code in SMC used sk_dst_get()->dev outside of any RCU protection, allowing dereferencing of a freed dst_entry during concurrent route changes. This creates a Use-After-Free condition inside the connect handshake. A local process performing repeated connect() calls while routing structures are being updated or garbage-collected, causing dst to be freed concurrently. Any local unprivileged user creating SMC-capable sockets can indirectly trigger the race. For the CVSS the PR:L because only local processes can trigger this code path. Exploitation requires race timing.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

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

CWE not specified