CVE-2025-40173 (GCVE-0-2025-40173)

Vulnerability from cvelistv5 – Published: 2025-11-12 10:53 – Updated: 2026-08-05 12:08
VLAI
Title
net/ip6_tunnel: Prevent perpetual tunnel growth
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.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 566f8d5c8a443f2dd69c5460fdec43ed1c870c65 (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 11f6066af3bfb8149aa16c42c0b0c5ea5b199a94 (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 402b6985e872b4cf394bbbf33b503947a326a6cb (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 10fe967efe73c610e526ff7460581610633dee9c (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 48294a67863c9cfa367abb66bbf0ef6548ae124f (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < eeb4345488672584db4f8c20a1ae13a212ce31c4 (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < b6eb25d870f1a8ae571fd3da2244b71df547824b (git)
Affected: 8eb30be0352d09165e94a41fef1c7b994dca0714 , < 21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16 (git)
Create a notification for this product.
Linux Linux Affected: 4.7
Unaffected: 0 , < 4.7 (semver)
Unaffected: 5.4.301 , ≤ 5.4.* (semver)
Unaffected: 5.10.246 , ≤ 5.10.* (semver)
Unaffected: 5.15.196 , ≤ 5.15.* (semver)
Unaffected: 6.1.158 , ≤ 6.1.* (semver)
Unaffected: 6.6.114 , ≤ 6.6.* (semver)
Unaffected: 6.12.55 , ≤ 6.12.* (semver)
Unaffected: 6.17.5 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40173",
      "date": "2026-08-05",
      "epss": "0.00141",
      "percentile": "0.03883"
    },
    "microsoft_vex": {
      "current_release_date": "2025-12-07T01:50:19.000Z",
      "cve": "CVE-2025-40173",
      "id": "msrc_CVE-2025-40173",
      "initial_release_date": "2025-11-02T00:00:00.000Z",
      "product_status:fixed": "1",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "net/ip6_tunnel: Prevent perpetual tunnel growth",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-40173.json",
      "version": "2"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40173\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-11-12T11:15:47.780\",\"lastModified\":\"2026-07-30T06:24:16.057\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"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\",\"versions\":[{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"566f8d5c8a443f2dd69c5460fdec43ed1c870c65\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"11f6066af3bfb8149aa16c42c0b0c5ea5b199a94\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"402b6985e872b4cf394bbbf33b503947a326a6cb\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"10fe967efe73c610e526ff7460581610633dee9c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"48294a67863c9cfa367abb66bbf0ef6548ae124f\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"eeb4345488672584db4f8c20a1ae13a212ce31c4\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"b6eb25d870f1a8ae571fd3da2244b71df547824b\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"8eb30be0352d09165e94a41fef1c7b994dca0714\",\"lessThan\":\"21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"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\",\"versions\":[{\"version\":\"4.7\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.7\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.4.301\",\"lessThanOrEqual\":\"5.4.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.10.246\",\"lessThanOrEqual\":\"5.10.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.196\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.158\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.114\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.55\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.5\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"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}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/10fe967efe73c610e526ff7460581610633dee9c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/11f6066af3bfb8149aa16c42c0b0c5ea5b199a94\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/402b6985e872b4cf394bbbf33b503947a326a6cb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/48294a67863c9cfa367abb66bbf0ef6548ae124f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/566f8d5c8a443f2dd69c5460fdec43ed1c870c65\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b6eb25d870f1a8ae571fd3da2244b71df547824b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/eeb4345488672584db4f8c20a1ae13a212ce31c4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:47:47+00:00",
      "cve": "CVE-2025-40173",
      "id": "CVE-2025-40173",
      "initial_release_date": "2025-11-12T00:00:00+00:00",
      "product_status:known_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: net/ip6_tunnel: Prevent perpetual tunnel growth",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40173.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…