{"id":"CVE-2025-40133","state":"PUBLISHED","title":"mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().\n\nmptcp_active_enable() is called from subflow_finish_connect(),\nwhich is icsk->icsk_af_ops->sk_rx_dst_set() and it's not always\nunder RCU.\n\nUsing sk_dst_get(sk)->dev could trigger UAF.\n\nLet's use __sk_dst_get() and dst_dev_rcu().","publishedAt":"2025-11-12T10:23:22.498Z","updatedAt":"2026-08-05T12:07:59.353Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"ad16235c9d3ef7ec17c109ff39b7504f49d17072","versionType":"git"},{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"cc976ec9e38bb79409de3261ba1dbb6868e2a53e","versionType":"git"},{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"893c49a78d9f85e4b8081b908fb7c407d018106a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mptcp/ctrl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.55","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mptcp/ctrl.c"]}],"references":["https://git.kernel.org/stable/c/ad16235c9d3ef7ec17c109ff39b7504f49d17072","https://git.kernel.org/stable/c/cc976ec9e38bb79409de3261ba1dbb6868e2a53e","https://git.kernel.org/stable/c/893c49a78d9f85e4b8081b908fb7c407d018106a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40133.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40133","state":"PUBLISHED","datePublished":"2025-11-12T10:23:22.498Z","dateUpdated":"2026-08-05T12:07:59.353Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.170Z"},"containers":{"cna":{"title":"mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().\n\nmptcp_active_enable() is called from subflow_finish_connect(),\nwhich is icsk->icsk_af_ops->sk_rx_dst_set() and it's not always\nunder RCU.\n\nUsing sk_dst_get(sk)->dev could trigger UAF.\n\nLet's use __sk_dst_get() and dst_dev_rcu()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"ad16235c9d3ef7ec17c109ff39b7504f49d17072","versionType":"git"},{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"cc976ec9e38bb79409de3261ba1dbb6868e2a53e","versionType":"git"},{"version":"27069e7cb3d1cea9377069266acf19b9cc5ad0ae","status":"affected","lessThan":"893c49a78d9f85e4b8081b908fb7c407d018106a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mptcp/ctrl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.55","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mptcp/ctrl.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ad16235c9d3ef7ec17c109ff39b7504f49d17072"},{"url":"https://git.kernel.org/stable/c/cc976ec9e38bb79409de3261ba1dbb6868e2a53e"},{"url":"https://git.kernel.org/stable/c/893c49a78d9f85e4b8081b908fb7c407d018106a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The stale `dst->dev` dereference executes while processing a remote peer's SYN-ACK — `tcp_finish_connect()` → `icsk_af_ops->sk_rx_dst_set()` → `subflow_finish_connect()` → `mptcp_active_enable()` — so remote network data drives entry into the vulnerable code, and the peer also controls the MP_CAPABLE/blackhole state that unlocks the guarded block. Any MPTCP-enabled host making outbound connections (mobile/carrier stacks, mptcpize'd services, MPTCP proxies) is exposed to a malicious or on-path server.\nAC:H - The attacker controls one side of the race (when the SYN-ACK arrives and thus when `dst->dev` is read), but the other side requires the route's `net_device` to be concurrently unregistered so `dst_dev_put()`/`netdev_ref_replace()` drops the last reference and `free_netdev()` runs — a local netdev-teardown event a remote peer can neither induce nor time, as is landing the SYN-ACK in the socket backlog (non-RCU process context) rather than softirq.\nPR:N - The vulnerable code runs during the TCP/MPTCP handshake itself, before any application-level authentication or credential exchange, so the remote peer needs no privileges or account of any kind on the target.\nUI:N - Outbound MPTCP connections are made automatically by daemons, mobile connectivity stacks, and proxies without any human action, and an on-path attacker can simply inject the MP_CAPABLE SYN-ACK for a connection the host initiates on its own.\nS:U - The use-after-free is on a kernel `struct net_device` and its effects stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a use-after-free read of a freed, heap-sprayable `net_device`, and a reclaimed slab can be groomed with attacker-influenced data, giving a read primitive over reclaimed kernel memory; the value read (`dev->flags & IFF_LOOPBACK`) further acts as an oracle since it determines whether `active_disable_times` is cleared, which is observable through subsequent MPTCP fallback behaviour and the MPTCP MIB counters.\nI:H - A use-after-free on a `net_device` is a heap-corruption primitive whose reclaimed contents are attacker-influenceable via spraying, and here freed memory directly steers a kernel state write (`atomic_set(&pernet->active_disable_times, 0)`), letting uncontrolled reclaimed data modify per-namespace MPTCP protocol state and, once the slab is groomed, be escalated toward arbitrary write and control-flow hijack.\nA:H - Dereferencing a freed `net_device` — allocated with `kvzalloc` and potentially unmapped on free — reliably produces a kernel oops or panic even when not weaponized, and the trigger can be retried indefinitely for a persistent denial of service."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:07:59.353Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.55"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}