Skip to content
Heist/ feed
Back to feed
UnratedFix available

ipv4: Fix reference count leak when using error routes with nexthop objects

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ipv4: Fix reference count leak when using error routes with nexthop objects When a nexthop object is deleted, it is marked as dead and then fib_table_flush() is called to flush all the routes that are using the dead nexthop. The current logic in fib_table_flush() is to only flush error routes (e.g., blackhole) when it is called as part of network namespace dismantle (i.e., with flush_all=true). Therefore, error routes are not flushed when their nexthop object is deleted: # ip link add name dummy1 up type dummy # ip nexthop add id 1 dev dummy1 # ip route add 198.51.100.1/32 nhid 1 # ip route add blackhole 198.51.100.2/32 nhid 1 # ip nexthop del id 1 # ip route show blackhole 198.51.100.2 nhid 1 dev dummy1 As such, they keep holding a reference on the nexthop object which in turn holds a reference on the nexthop device, resulting in a reference count leak: # ip link del dev dummy1 [ 70.516258] unregister_netdevice: waiting for dummy1 to become free. Usage count = 2 Fix by flushing error routes when their nexthop is marked as dead. IPv6 does not suffer from this problem.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.248, 5.15.198, 6.1.160, 6.12.64, 6.18.4, 6.6.120
CVEs
CVE-2025-71097
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 18:06 UTC · Revision 1

Source evidence

ipv4: Fix reference count leak when using error routes with nexthop objects

core-osv · Original source

Published 13 Jan 2026, 15:34 UTC

In the Linux kernel, the following vulnerability has been resolved: ipv4: Fix reference count leak when using error routes with nexthop objects When a nexthop object is deleted, it is marked as dead and then fib_table_flush() is called to flush all the routes that are using the dead nexthop. The current logic in fib_table_flush() is to only flush error routes (e.g., blackhole) when it is called as part of network namespace dismantle (i.e., with flush_all=true). Therefore, error routes are not flushed when their nexthop object is deleted: # ip link add name dummy1 up type dummy # ip nexthop add id 1 dev dummy1 # ip route add 198.51.100.1/32 nhid 1 # ip route add blackhole 198.51.100.2/32 nhid 1 # ip nexthop del id 1 # ip route show blackhole 198.51.100.2 nhid 1 dev dummy1 As such, they keep holding a reference on the nexthop object which in turn holds a reference on the nexthop device, resulting in a reference count leak: # ip link del dev dummy1 [ 70.516258] unregister_netdevice: waiting for dummy1 to become free. Usage count = 2 Fix by flushing error routes when their nexthop is marked as dead. IPv6 does not suffer from this problem.

osv:CVE-2025-71097

Kernel

Fixed versions: 5.10.248, 5.15.198, 6.1.160, 6.6.120, 6.12.64, 6.18.4

Complete source record
{
  "id": "2a20a64c23061ecd3f69eca61455045fe6764d1e4e7a9ac1722c51e056db3ca4",
  "url": "https://osv.dev/vulnerability/CVE-2025-71097",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ipv4: Fix reference count leak when using error routes with nexthop objects",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ipv4: Fix reference count leak when using error routes with nexthop objects When a nexthop object is deleted, it is marked as dead and then fib_table_flush() is called to flush all the routes that are using the dead nexthop. The current logic in fib_table_flush() is to only flush error routes (e.g., blackhole) when it is called as part of network namespace dismantle (i.e., with flush_all=true). Therefore, error routes are not flushed when their nexthop object is deleted: # ip link add name dummy1 up type dummy # ip nexthop add id 1 dev dummy1 # ip route add 198.51.100.1/32 nhid 1 # ip route add blackhole 198.51.100.2/32 nhid 1 # ip nexthop del id 1 # ip route show blackhole 198.51.100.2 nhid 1 dev dummy1 As such, they keep holding a reference on the nexthop object which in turn holds a reference on the nexthop device, resulting in a reference count leak: # ip link del dev dummy1 [ 70.516258] unregister_netdevice: waiting for dummy1 to become free. Usage count = 2 Fix by flushing error routes when their nexthop is marked as dead. IPv6 does not suffer from this problem.",
    "evidence": "osv:CVE-2025-71097",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.248",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.198",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.160",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.120",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.64",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-71097",
      "aliases": [
        "CVE-2025-71097"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "493ced1ac47c48bb86d9d4e8e87df8592be85a0e"
                },
                {
                  "fixed": "5de7ad7e18356e39e8fbf7edd185a5faaf4f385a"
                },
                {
                  "fixed": "33ff5c207c873215e54e6176624ed57423cb7dea"
                },
                {
                  "fixed": "30386e090c49e803c0616a7147e43409c32a2b0e"
                },
                {
                  "fixed": "5979338c83012110ccd45cae6517591770bfe536"
                },
                {
                  "fixed": "ee4183501ea556dca31f5ffd8690aa9fd25b609f"
                },
                {
                  "fixed": "e3fc381320d04e4a74311e576a86cac49a16fc43"
                },
                {
                  "fixed": "ac782f4e3bfcde145b8a7f8af31d9422d94d172a"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-71097.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.3.0"
                },
                {
                  "fixed": "5.10.248"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.198"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.160"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.120"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.64"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-71097.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.027617322Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
        "https://git.kernel.org/stable/c/30386e090c49e803c0616a7147e43409c32a2b0e",
        "https://git.kernel.org/stable/c/33ff5c207c873215e54e6176624ed57423cb7dea",
        "https://git.kernel.org/stable/c/5979338c83012110ccd45cae6517591770bfe536",
        "https://git.kernel.org/stable/c/5de7ad7e18356e39e8fbf7edd185a5faaf4f385a",
        "https://git.kernel.org/stable/c/ac782f4e3bfcde145b8a7f8af31d9422d94d172a",
        "https://git.kernel.org/stable/c/e3fc381320d04e4a74311e576a86cac49a16fc43",
        "https://git.kernel.org/stable/c/ee4183501ea556dca31f5ffd8690aa9fd25b609f",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71097.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-71097",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71097.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-71097",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 498220,
  "published_at": "2026-01-13T15:34:56.814+00:00"
}