CVE-2025-40173 (GCVE-0-2025-40173)
Vulnerability from cvelistv5
Published
2025-11-12 10:53
Modified
2026-08-05 12:08
Summary
In the Linux kernel, the following vulnerability has been resolved: net/ip6_tunnel: Prevent perpetual tunnel growth Similarly to ipv4 tunnel, ipv6 version updates dev->needed_headroom, too. While ipv4 tunnel headroom adjustment growth was limited in commit 5ae1e9922bbd ("net: ip_tunnel: prevent perpetual headroom growth"), ipv6 tunnel yet increases the headroom without any ceiling. Reflect ipv4 tunnel headroom adjustment limit on ipv6 version. Credits to Francesco Ruggeri, who was originally debugging this issue and wrote local Arista-specific patch and a reproducer.
Impacted products
Vendor Product Version
Linux Linux Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Version: 8eb30be0352d09165e94a41fef1c7b994dca0714
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/net/ip_tunnels.h",
            "net/ipv4/ip_tunnel.c",
            "net/ipv6/ip6_tunnel.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "566f8d5c8a443f2dd69c5460fdec43ed1c870c65",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "11f6066af3bfb8149aa16c42c0b0c5ea5b199a94",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "402b6985e872b4cf394bbbf33b503947a326a6cb",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "10fe967efe73c610e526ff7460581610633dee9c",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "48294a67863c9cfa367abb66bbf0ef6548ae124f",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "eeb4345488672584db4f8c20a1ae13a212ce31c4",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "b6eb25d870f1a8ae571fd3da2244b71df547824b",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            },
            {
              "lessThan": "21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16",
              "status": "affected",
              "version": "8eb30be0352d09165e94a41fef1c7b994dca0714",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/net/ip_tunnels.h",
            "net/ipv4/ip_tunnel.c",
            "net/ipv6/ip6_tunnel.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.7"
            },
            {
              "lessThan": "4.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.301",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.246",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.196",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.158",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.55",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.5",
              "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": "5.4.301",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.246",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.196",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.158",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.114",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.55",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.5",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "4.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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-\u003eneeded_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": {
            "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 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 \u2014 tunnel creation, the looping routes, and the packet stream \u2014 and each transmitted packet deterministically increments `dev-\u003eneeded_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-\u003edata` points outside `skb-\u003ehead`, producing out-of-bounds/use-after-free reads \u2014 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-\u003edata`, 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:08:18.915Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40173",
    "datePublished": "2025-11-12T10:53:49.571Z",
    "dateReserved": "2025-04-16T07:20:57.177Z",
    "dateUpdated": "2026-08-05T12:08:18.915Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…