{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-40075", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T07:20:57.160Z", "datePublished": "2025-10-28T11:48:41.791Z", "dateUpdated": "2026-08-05T12:07:34.647Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T12:07:34.647Z" }, "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." } ], "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." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/ipv4/tcp_metrics.c" ], "versions": [ { "version": "4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36", "lessThan": "4b89397807eb04986427c4786d065e9442834ad4", "status": "affected", "versionType": "git" }, { "version": "4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36", "lessThan": "07613a95326ebad2d1b88d883cd72546025a4f3e", "status": "affected", "versionType": "git" }, { "version": "4a6ce2b6f2ecabbddcfe47e7cf61dd0f00b10e36", "lessThan": "50c127a69cd6285300931853b352a1918cfa180f", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/ipv4/tcp_metrics.c" ], "versions": [ { "version": "4.13", "status": "affected" }, { "version": "0", "lessThan": "4.13", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.63", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.17.3", "lessThanOrEqual": "6.17.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.18", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "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" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/4b89397807eb04986427c4786d065e9442834ad4" }, { "url": "https://git.kernel.org/stable/c/07613a95326ebad2d1b88d883cd72546025a4f3e" }, { "url": "https://git.kernel.org/stable/c/50c127a69cd6285300931853b352a1918cfa180f" } ], "title": "tcp_metrics: use dst_dev_net_rcu()", "x_generator": { "engine": "bippy-1.2.0" } } } }