# CVE-2025-22005: ipv6: Fix memleak of nhc\_pcpu\_rth\_output in fib\_check\_nh\_v6\_gw().

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-04-03 · Modified: 2026-11-10
- Aliases: UBUNTU-CVE-2025-22005, DEBIAN-CVE-2025-22005
- Record: https://cvemate.com/vulnerability/CVE-2025-22005 · JSON: https://cvemate.com/vulnerability/CVE-2025-22005/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().

fib_check_nh_v6_gw() expects that fib6_nh_init() cleans up everything
when it fails.

Commit 7dd73168e273 ("ipv6: Always allocate pcpu memory in a fib6_nh")
moved fib_nh_common_init() before alloc_percpu_gfp() within fib6_nh_init()
but forgot to add cleanup for fib6_nh->nh_common.nhc_pcpu_rth_output in
case it fails to allocate fib6_nh->rt6i_pcpu, resulting in memleak.

Let's call fib_nh_common_release() and clear nhc_pcpu_rth_output in the
error path.

Note that we can remove the fib6_nh_release() call in nh_create_ipv6()
later in net-next.git.
```

## Signals

- CVSS: 5.5 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.22%, percentile 13.251%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 137)

- debian linux (Debian): \< 6.1.133-1 \| \< 6.12.21-1
- ubuntu linux (Ubuntu): \< 5.4.0-218.238 \| \< 5.15.0-142.152 \| \< 6.8.0-84.84
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.4.0-1147.157 \| \< 5.15.0-1086.93 \| \< 6.8.0-1039.41
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1086.93~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1147.157~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1039.41~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 5.4.0-1147.157+fips1 \| All versions (No fix recorded) \| \< 5.15.0-1086.93+fips1 \| \< 6.8.0-1039.41+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1152.159 \| \< 5.15.0-1091.100 \| \< 6.8.0-1038.44
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1091.100~20.04.1

## References (first 20 of 56)

- <https://git.kernel.org/stable/c/16267a5036173d0173377545b4b6021b081d0933>
- <https://git.kernel.org/stable/c/1bd12dfc058e1e68759d313d7727d68dbc1b8964>
- <https://git.kernel.org/stable/c/596a883c4ce2d2e9c175f25b98fed3a1f33fea38>
- <https://git.kernel.org/stable/c/77c41cdbe6bce476e08d3251c0d501feaf10a9f3>
- <https://git.kernel.org/stable/c/119dcafe36795a15ae53351cbbd6177aaf94ffef>
- <https://git.kernel.org/stable/c/29d91820184d5cbc70f3246d4911d96eaeb930d6>
- <https://git.kernel.org/stable/c/d3d5b4b5ae263c3225db363ba08b937e2e2b0380>
- <https://git.kernel.org/stable/c/9740890ee20e01f99ff1dde84c63dcf089fabb98>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://ubuntu.com/security/CVE-2025-22005>
- <https://www.cve.org/CVERecord?id=CVE-2025-22005>
- <https://git.kernel.org/linus/9740890ee20e01f99ff1dde84c63dcf089fabb98>
- <https://ubuntu.com/security/notices/USN-7585-1>
- <https://ubuntu.com/security/notices/USN-7585-2>
- <https://ubuntu.com/security/notices/USN-7591-1>
- <https://ubuntu.com/security/notices/USN-7591-2>
- <https://ubuntu.com/security/notices/USN-7591-3>
- <https://ubuntu.com/security/notices/USN-7592-1>

---

Data as of 2026-12-05T03:38:39.418Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
