{"id":"CVE-2025-40075","state":"PUBLISHED","title":"tcp_metrics: use dst_dev_net_rcu()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp_metrics: use dst_dev_net_rcu()\n\nReplace three dst_dev() with a lockdep enabled helper.","publishedAt":"2025-10-28T11:48:41.791Z","updatedAt":"2026-10-30T12:22:48.219Z","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":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"23261817e955ebeb91d7c5c667d09fa415eb88b4","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"7012bea5622396b37566fbdc059f7c6a6c279d74","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"4b89397807eb04986427c4786d065e9442834ad4","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"07613a95326ebad2d1b88d883cd72546025a4f3e","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"50c127a69cd6285300931853b352a1918cfa180f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_metrics.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.13","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.63","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/ipv4/tcp_metrics.c"]}],"references":["https://git.kernel.org/stable/c/23261817e955ebeb91d7c5c667d09fa415eb88b4","https://git.kernel.org/stable/c/7012bea5622396b37566fbdc059f7c6a6c279d74","https://git.kernel.org/stable/c/4b89397807eb04986427c4786d065e9442834ad4","https://git.kernel.org/stable/c/07613a95326ebad2d1b88d883cd72546025a4f3e","https://git.kernel.org/stable/c/50c127a69cd6285300931853b352a1918cfa180f"],"weaknesses":[],"ingestedAt":"2026-10-30T12:40:04.423Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40075.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40075","state":"PUBLISHED","datePublished":"2025-10-28T11:48:41.791Z","dateUpdated":"2026-10-30T12:22:48.219Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.160Z"},"containers":{"cna":{"title":"tcp_metrics: use dst_dev_net_rcu()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp_metrics: use dst_dev_net_rcu()\n\nReplace three dst_dev() with a lockdep enabled helper."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"23261817e955ebeb91d7c5c667d09fa415eb88b4","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"7012bea5622396b37566fbdc059f7c6a6c279d74","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"4b89397807eb04986427c4786d065e9442834ad4","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"07613a95326ebad2d1b88d883cd72546025a4f3e","versionType":"git"},{"version":"4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36","status":"affected","lessThan":"50c127a69cd6285300931853b352a1918cfa180f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_metrics.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.13","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.63","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/ipv4/tcp_metrics.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/23261817e955ebeb91d7c5c667d09fa415eb88b4"},{"url":"https://git.kernel.org/stable/c/7012bea5622396b37566fbdc059f7c6a6c279d74"},{"url":"https://git.kernel.org/stable/c/4b89397807eb04986427c4786d065e9442834ad4"},{"url":"https://git.kernel.org/stable/c/07613a95326ebad2d1b88d883cd72546025a4f3e"},{"url":"https://git.kernel.org/stable/c/50c127a69cd6285300931853b352a1918cfa180f"}],"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 three fixed call sites sit in the core TCP metrics cache, reached from `tcp_conn_request()` on an inbound SYN, from `tcp_finish_connect()`, from the TIME-WAIT/LAST-ACK teardown path, and from TCP Fast Open — all driven purely by packets from a remote peer. No local access is needed to reach the vulnerable code.\nAC:H - The stale `dst->dev` window only exists while `dst_dev_put()` is concurrently swapping the device to the blackhole netdev during a route removal or NETDEV_DOWN/UNREGISTER event, which a remote attacker cannot induce or time. The attacker controls only the TCP-connection side of the race.\nPR:N - `tcp_peer_is_proven()` is invoked from `tcp_conn_request()` while processing an unauthenticated SYN, before any application-level credentials exist, and the other paths only require establishing or closing a normal TCP connection. No kernel privilege check or capability gate exists anywhere along the path.\nUI:N - The code runs entirely from softirq/socket context on packet receive and connection teardown; no local user or administrator action is required to trigger it.\nS:U - The unprotected dereference and its consequences are confined to the kernel's own memory and the network stack — the same security authority. There is no VM, IOMMU, or sandbox boundary crossed.\nC:H - A use-after-free read of a released `struct net_device` yields a `struct net` pointer taken from reclaimed memory, which is then used to compute hashes and index the per-namespace metrics cache; attacker-groomed heap contents can be interpreted as kernel structures, enabling disclosure of kernel memory.\nI:H - The bogus `struct net` derived from the freed device is stored into `tm->tcpm_net` and drives `tcpm_new()`/`tcpm_suck_dst()` writes, so freed or attacker-controlled memory is treated as a live namespace object — a UAF of this class is leverageable for controlled kernel writes and control-flow hijack.\nA:H - Dereferencing a freed `net_device` through `dev_net_rcu()` and then using the resulting garbage `struct net` pointer for `net_hash_mix()` and cache lookups leads to an oops or panic, taking down the whole system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:22:48.219Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.12.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-40075","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:56:41.266469Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:37.357Z"}}]}}}