# CVE-2025-40139: smc: Use \_\_sk\_dst\_get() and dst\_dev\_rcu() in in smc\_clc\_prfx\_set().

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 6, 2026-12-01)
- **Published:** 2025-11-12T10:23:24.216Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 80d1fd39f4e37d836655e9f7ffccaf78925049bf; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 956c57daba55cf9ed25d9f2512883b8a1a927599; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 0736993bfe5c7a9c744ae3fac62d769dfdae54e1; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 935d783e5de9b64587f3adb25641dd8385e64ddb
- Anyone running Linux 4.11

## 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.

## Affected and fixed versions

- Linux: \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 80d1fd39f4e37d836655e9f7ffccaf78925049bf; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 956c57daba55cf9ed25d9f2512883b8a1a927599; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 0736993bfe5c7a9c744ae3fac62d769dfdae54e1; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 935d783e5de9b64587f3adb25641dd8385e64ddb (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 935d783e5de9b64587f3adb25641dd8385e64ddb or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40139. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40139.md
Affected: Linux >= a046d57da19f812216f393e7c535f5858f793ac3, < 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde; >= a046d57da19f812216f393e7c535f5858f793ac3, < 80d1fd39f4e37d836655e9f7ffccaf78925049bf; >= a046d57da19f812216f393e7c535f5858f793ac3, < 956c57daba55cf9ed25d9f2512883b8a1a927599; >= a046d57da19f812216f393e…
Fixed in: Linux 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde, Linux 80d1fd39f4e37d836655e9f7ffccaf78925049bf, Linux 956c57daba55cf9ed25d9f2512883b8a1a927599, Linux 0736993bfe5c7a9c744ae3fac62d769dfdae54e1, Linux 935d783e5de9b64587f3adb25641dd8385e64ddb

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40139 being exploited?

There is no confirmed exploitation: CVE-2025-40139 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2025-40139?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-40139?

Linux \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 80d1fd39f4e37d836655e9f7ffccaf78925049bf; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 956c57daba55cf9ed25d9f2512883b8a1a927599; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 0736993bfe5c7a9c744ae3fac62d769dfdae54e1; \>= a046d57da19f812216f393e7c535f5858f793ac3, \< 935d783e5de9b64587f3adb25641dd8385e64ddb; Linux 4.11.

### Is there a fix for CVE-2025-40139?

Yes. Fixed in Linux 5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde, Linux 80d1fd39f4e37d836655e9f7ffccaf78925049bf, Linux 956c57daba55cf9ed25d9f2512883b8a1a927599, Linux 0736993bfe5c7a9c744ae3fac62d769dfdae54e1, Linux 935d783e5de9b64587f3adb25641dd8385e64ddb. Upgrade Linux to 935d783e5de9b64587f3adb25641dd8385e64ddb or later.

### How do I check if I'm affected by CVE-2025-40139?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/5a2fccc4b32c13ddde3676f9e15e1a9baa7d6fde>
- other: <https://git.kernel.org/stable/c/80d1fd39f4e37d836655e9f7ffccaf78925049bf>
- other: <https://git.kernel.org/stable/c/956c57daba55cf9ed25d9f2512883b8a1a927599>
- other: <https://git.kernel.org/stable/c/0736993bfe5c7a9c744ae3fac62d769dfdae54e1>
- other: <https://git.kernel.org/stable/c/935d783e5de9b64587f3adb25641dd8385e64ddb>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40139>

HTML: <https://flawdb.com/CVE-2025-40139> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40139>
