{"api_version":"1","generated_at":"2026-10-24T03:20:06+00:00","cve":"CVE-2025-40170","urls":{"html":"https://cve.report/CVE-2025-40170","api":"https://cve.report/api/cve/CVE-2025-40170.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-40170","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-40170"},"summary":{"title":"net: use dst_dev_rcu() in sk_setup_caps()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use dst_dev_rcu() in sk_setup_caps()\n\nUse RCU to protect accesses to dst->dev from sk_setup_caps()\nand sk_dst_gso_max_size().\n\nAlso use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(),\nand ip_dst_mtu_maybe_forward().\n\nip4_dst_hoplimit() can use dst_dev_net_rcu().","state":"PUBLISHED","assigner":"Linux","published_at":"2025-11-12 11:15:47","updated_at":"2026-10-21 13:18:19"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/99a2ace61b211b0be861b07fbaa062fca4b58879","name":"https://git.kernel.org/stable/c/99a2ace61b211b0be861b07fbaa062fca4b58879","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9f22b5f7f1a32f8bbcc82bf34e34ea63523fcd02","name":"https://git.kernel.org/stable/c/9f22b5f7f1a32f8bbcc82bf34e34ea63523fcd02","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a805729c0091073d8f0415cfa96c7acd1bc17a48","name":"https://git.kernel.org/stable/c/a805729c0091073d8f0415cfa96c7acd1bc17a48","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5d1be493d1110c9e720b4c51a6e587bb2fb4ac12","name":"https://git.kernel.org/stable/c/5d1be493d1110c9e720b4c51a6e587bb2fb4ac12","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40170","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40170","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36 9f22b5f7f1a32f8bbcc82bf34e34ea63523fcd02 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36 5d1be493d1110c9e720b4c51a6e587bb2fb4ac12 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36 a805729c0091073d8f0415cfa96c7acd1bc17a48 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36 99a2ace61b211b0be861b07fbaa062fca4b58879 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.13","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.160 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.64 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17.3 6.17.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2025","cve_id":"40170","cve":"CVE-2025-40170","epss":"0.001580000","percentile":"0.045070000","score_date":"2026-10-19","updated_at":"2026-10-20 00:13:48"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2025-40170","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-06-16T19:33:10.426175Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-06-16T19:33:20.303Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["include/net/ip.h","include/net/ip6_route.h","include/net/route.h","net/core/sock.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"9f22b5f7f1a32f8bbcc82bf34e34ea63523fcd02","status":"affected","version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","versionType":"git"},{"lessThan":"5d1be493d1110c9e720b4c51a6e587bb2fb4ac12","status":"affected","version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","versionType":"git"},{"lessThan":"a805729c0091073d8f0415cfa96c7acd1bc17a48","status":"affected","version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","versionType":"git"},{"lessThan":"99a2ace61b211b0be861b07fbaa062fca4b58879","status":"affected","version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["include/net/ip.h","include/net/ip6_route.h","include/net/route.h","net/core/sock.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.13"},{"lessThan":"4.13","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.160","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.64","versionType":"semver"},{"lessThanOrEqual":"6.17.*","status":"unaffected","version":"6.17.3","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.18","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.160","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.64","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.17.3","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18","versionStartIncluding":"4.13","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use dst_dev_rcu() in sk_setup_caps()\n\nUse RCU to protect accesses to dst->dev from sk_setup_caps()\nand sk_dst_gso_max_size().\n\nAlso use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(),\nand ip_dst_mtu_maybe_forward().\n\nip4_dst_hoplimit() can use dst_dev_net_rcu()."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The unprotected `sk_setup_caps()` reader is reached from process-context syscalls (connect/sendmsg/SCTP output), and the racing `dst_dev_put()`/netdev-unregister side requires local netns and link/route manipulation; the remote-triggered call site (`tcp_v4_syn_recv_sock`) runs BH-disabled and is implicitly RCU-protected.\nAC:L - The attacker controls both sides of the race — one thread loops connect()/sendmsg() on sockets holding the dst while another deletes the veth/route in its own netns — and can retry indefinitely until the window is hit.\nPR:L - An unprivileged local account suffices; CAP_NET_ADMIN needed for link/route teardown is obtainable without real root via user namespaces (`unshare -Urn`), and the socket side needs no privilege at all.\nUI:N - Exploitation is entirely driven by the attacker's own threads issuing socket syscalls and netlink link/route operations; no victim action is required.\nS:U - The use-after-free is on a kernel `struct net_device` and its effects stay within the kernel's own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - This is a use-after-free read of a freed, heap-sprayable `net_device`; its contents are loaded into `sk_route_caps`, `sk_gso_max_size` and `sk_gso_max_segs`, which observably alter TCP segmentation and thus leak freed-memory contents, and per UAF guidance this is High.\nI:H - Values read from freed memory are written into persistent socket state and then drive packet construction — bogus SG/HW_CSUM/GSO feature bits and an underflowed multi-gigabyte `sk_gso_max_size` corrupt the TX path, and a UAF on a sprayable object is treatable as an arbitrary-write primitive.\nA:H - Dereferencing a freed `net_device` can oops outright, and the resulting garbage GSO sizes/segment counts produce oversized skb allocations and inconsistent offload state that crash the transmit path and drivers."}]}],"providerMetadata":{"dateUpdated":"2026-10-21T12:37:51.619Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/9f22b5f7f1a32f8bbcc82bf34e34ea63523fcd02"},{"url":"https://git.kernel.org/stable/c/5d1be493d1110c9e720b4c51a6e587bb2fb4ac12"},{"url":"https://git.kernel.org/stable/c/a805729c0091073d8f0415cfa96c7acd1bc17a48"},{"url":"https://git.kernel.org/stable/c/99a2ace61b211b0be861b07fbaa062fca4b58879"}],"title":"net: use dst_dev_rcu() in sk_setup_caps()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2025-40170","datePublished":"2025-11-12T10:46:52.014Z","dateReserved":"2025-04-16T07:20:57.176Z","dateUpdated":"2026-10-21T12:37:51.619Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-11-12 11:15:47","lastModifiedDate":"2026-10-21 13:18:19","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-06-16T19:33:10.426175Z","id":"CVE-2025-40170","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"40170","Ordinal":"1","Title":"net: use dst_dev_rcu() in sk_setup_caps()","CVE":"CVE-2025-40170","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"40170","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use dst_dev_rcu() in sk_setup_caps()\n\nUse RCU to protect accesses to dst->dev from sk_setup_caps()\nand sk_dst_gso_max_size().\n\nAlso use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(),\nand ip_dst_mtu_maybe_forward().\n\nip4_dst_hoplimit() can use dst_dev_net_rcu().","Type":"Description","Title":"net: use dst_dev_rcu() in sk_setup_caps()"}]}}}