{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-40173", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T07:20:57.177Z", "datePublished": "2025-11-12T10:53:49.571Z", "dateUpdated": "2026-08-05T12:08:18.915Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T12:08:18.915Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/ip6_tunnel: Prevent perpetual tunnel growth\n\nSimilarly to ipv4 tunnel, ipv6 version updates dev->needed_headroom, too.\nWhile ipv4 tunnel headroom adjustment growth was limited in\ncommit 5ae1e9922bbd (\"net: ip_tunnel: prevent perpetual headroom growth\"),\nipv6 tunnel yet increases the headroom without any ceiling.\n\nReflect ipv4 tunnel headroom adjustment limit on ipv6 version.\n\nCredits to Francesco Ruggeri, who was originally debugging this issue\nand wrote local Arista-specific patch and a reproducer." } ], "metrics": [ { "cvssV3_1": { "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" }, "scenarios": [ { "lang": "en", "value": "AV:L - The unbounded growth is driven by the local transmit path (`ip6_tnl_xmit`) and requires the attacker to establish a two-tunnel routing loop and then push packets into it, which is done via netlink/socket operations on the local system. A purely remote attacker cannot create the required tunnel topology, so the reliable, fully attacker-controlled path is local.\nAC:L - The attacker controls every precondition — tunnel creation, the looping routes, and the packet stream — and each transmitted packet deterministically increments `dev->needed_headroom` until the u16 header offset wraps; no race, memory-layout luck, or victim state is involved.\nPR:L - Configuring ip6tnl/ip6gre devices and routes needs CAP_NET_ADMIN, but an unprivileged user gains that in their own network namespace with `unshare -Urn`, and the resulting heap corruption is not confined to that namespace.\nUI:N - The attacker creates the tunnels and generates the traffic itself; no action by any other user or administrator is required.\nS:U - The corruption occurs in kernel memory within the same security authority; there is no VM, IOMMU, or hypervisor boundary crossed, making this standard in-kernel privilege escalation.\nC:H - Once `network_header` wraps, `skb->data` points outside `skb->head`, producing out-of-bounds/use-after-free reads — the IPv4 twin of this bug was reported as a KASAN use-after-free read in `__skb_flow_dissect`, and such reads can disclose arbitrary adjacent kernel heap contents.\nI:H - After the negative `__skb_pull`, `dev_hard_header()` pushes and writes an L2 header at the out-of-bounds `skb->data`, giving an out-of-bounds write into unrelated kernel heap memory that can be leveraged for control-flow hijacking.\nA:H - The wrapped offsets and out-of-bounds accesses reliably produce kernel oops/panic, and the runaway headroom also forces ever-larger skb head reallocations, exhausting memory and destabilizing the system." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "include/net/ip_tunnels.h", "net/ipv4/ip_tunnel.c", "net/ipv6/ip6_tunnel.c" ], "versions": [ { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "566f8d5c8a443f2dd69c5460fdec43ed1c870c65", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "11f6066af3bfb8149aa16c42c0b0c5ea5b199a94", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "402b6985e872b4cf394bbbf33b503947a326a6cb", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "10fe967efe73c610e526ff7460581610633dee9c", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "48294a67863c9cfa367abb66bbf0ef6548ae124f", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "eeb4345488672584db4f8c20a1ae13a212ce31c4", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "b6eb25d870f1a8ae571fd3da2244b71df547824b", "status": "affected", "versionType": "git" }, { "version": "8eb30be0352d09165e94a41fef1c7b994dca0714", "lessThan": "21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "include/net/ip_tunnels.h", "net/ipv4/ip_tunnel.c", "net/ipv6/ip6_tunnel.c" ], "versions": [ { "version": "4.7", "status": "affected" }, { "version": "0", "lessThan": "4.7", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.301", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.246", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.196", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.158", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.114", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.55", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.17.5", "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.7", "versionEndExcluding": "5.4.301" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "5.10.246" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "5.15.196" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "6.1.158" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "6.6.114" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "6.12.55" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "6.17.5" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.7", "versionEndExcluding": "6.18" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/566f8d5c8a443f2dd69c5460fdec43ed1c870c65" }, { "url": "https://git.kernel.org/stable/c/11f6066af3bfb8149aa16c42c0b0c5ea5b199a94" }, { "url": "https://git.kernel.org/stable/c/402b6985e872b4cf394bbbf33b503947a326a6cb" }, { "url": "https://git.kernel.org/stable/c/10fe967efe73c610e526ff7460581610633dee9c" }, { "url": "https://git.kernel.org/stable/c/48294a67863c9cfa367abb66bbf0ef6548ae124f" }, { "url": "https://git.kernel.org/stable/c/eeb4345488672584db4f8c20a1ae13a212ce31c4" }, { "url": "https://git.kernel.org/stable/c/b6eb25d870f1a8ae571fd3da2244b71df547824b" }, { "url": "https://git.kernel.org/stable/c/21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16" } ], "title": "net/ip6_tunnel: Prevent perpetual tunnel growth", "x_generator": { "engine": "bippy-1.2.0" } } } }