VYPR
Unrated severityNVD Advisory· Published Nov 12, 2025· Updated Apr 15, 2026

CVE-2025-40170

CVE-2025-40170

Description

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

net: use dst_dev_rcu() in sk_setup_caps()

Use RCU to protect accesses to dst->dev from sk_setup_caps() and sk_dst_gso_max_size().

Also use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(), and ip_dst_mtu_maybe_forward().

ip4_dst_hoplimit() can use dst_dev_net_rcu().

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A Linux kernel fix uses RCU to protect dst->dev accesses in sk_setup_caps() and related functions, preventing use-after-free bugs.

Vulnerability

Analysis

This vulnerability is a race condition in the Linux kernel's networking stack. The functions sk_setup_caps(), sk_dst_gso_max_size(), ip6_dst_mtu_maybe_forward(), ip_dst_mtu_maybe_forward(), and ip4_dst_hoplimit() access the dst->dev field without proper synchronization. This can lead to a use-after-free if the device is removed while these functions are executing, as the dst entry may still reference a freed dev after it has been freed [1].

Exploitation

An attacker would need to trigger this race condition by causing a network namespace or device to be removed while concurrent network operations are in progress. The attack requires the ability to trigger device removal (e.g., via netlink or namespace deletion) while other threads are performing socket operations that call the affected functions. No special privileges beyond the ability to manage network devices are needed, though the race window is narrow [1].

Impact

Successful exploitation could allow an attacker to cause a use-after-free, leading to a kernel crash (denial of service) or potentially arbitrary code execution in kernel context. The impact is system-wide, as the networking stack is core to kernel operation [1].

Mitigation

The fix introduces RCU (Read-Copy-Update) protection for dst->dev accesses in the affected functions. The patch has been applied to the Linux kernel stable tree. Users should update to a kernel version containing this commit [1].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

3

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.