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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-04-03T07:19:06.716Z
- **Modified:** 2026-11-10T13:17:40.783Z

## Who should check

- Anyone running Linux \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 16267a5036173d0173377545b4b6021b081d0933; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 1bd12dfc058e1e68759d313d7727d68dbc1b8964; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 596a883c4ce2d2e9c175f25b98fed3a1f33fea38; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 77c41cdbe6bce476e08d3251c0d501feaf10a9f3; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 119dcafe36795a15ae53351cbbd6177aaf94ffef; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 29d91820184d5cbc70f3246d4911d96eaeb930d6; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< d3d5b4b5ae263c3225db363ba08b937e2e2b0380; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 9740890ee20e01f99ff1dde84c63dcf089fabb98
- Anyone running Linux 5.3

## Description

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.

## Affected and fixed versions

- Linux: \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 16267a5036173d0173377545b4b6021b081d0933; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 1bd12dfc058e1e68759d313d7727d68dbc1b8964; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 596a883c4ce2d2e9c175f25b98fed3a1f33fea38; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 77c41cdbe6bce476e08d3251c0d501feaf10a9f3; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 119dcafe36795a15ae53351cbbd6177aaf94ffef; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 29d91820184d5cbc70f3246d4911d96eaeb930d6; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< d3d5b4b5ae263c3225db363ba08b937e2e2b0380; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 9740890ee20e01f99ff1dde84c63dcf089fabb98 (cvelist)
- Linux: 5.3 (cvelist)

## Mitigation

- Upgrade Linux to 9740890ee20e01f99ff1dde84c63dcf089fabb98 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-22005. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-22005.md
Affected: Linux >= 7dd73168e273938b9e9bb42ca51b0c27d807992b, < 16267a5036173d0173377545b4b6021b081d0933; >= 7dd73168e273938b9e9bb42ca51b0c27d807992b, < 1bd12dfc058e1e68759d313d7727d68dbc1b8964; >= 7dd73168e273938b9e9bb42ca51b0c27d807992b, < 596a883c4ce2d2e9c175f25b98fed3a1f33fea38; >= 7dd73168e273938b9e9bb42…
Fixed in: Linux 16267a5036173d0173377545b4b6021b081d0933, Linux 1bd12dfc058e1e68759d313d7727d68dbc1b8964, Linux 596a883c4ce2d2e9c175f25b98fed3a1f33fea38, Linux 77c41cdbe6bce476e08d3251c0d501feaf10a9f3, Linux 119dcafe36795a15ae53351cbbd6177aaf94ffef, Linux 29d91820184d5cbc70f3246d4911d96eaeb930d6, Linux 97408…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-22005 being exploited?

There is no confirmed exploitation: CVE-2025-22005 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-22005?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-22005?

Linux \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 16267a5036173d0173377545b4b6021b081d0933; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 1bd12dfc058e1e68759d313d7727d68dbc1b8964; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 596a883c4ce2d2e9c175f25b98fed3a1f33fea38; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 77c41cdbe6bce476e08d3251c0d501feaf10a9f3; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 119dcafe36795a15ae53351cbbd6177aaf94ffef; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 29d91820184d5cbc70f3246d4911d96eaeb930d6; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< d3d5b4b5ae263c3225db363ba08b937e2e2b0380; \>= 7dd73168e273938b9e9bb42ca51b0c27d807992b, \< 9740890ee20e01f99ff1dde84c63dcf089fabb98; Linux 5.3.

### Is there a fix for CVE-2025-22005?

Yes. Fixed in Linux 16267a5036173d0173377545b4b6021b081d0933, Linux 1bd12dfc058e1e68759d313d7727d68dbc1b8964, Linux 596a883c4ce2d2e9c175f25b98fed3a1f33fea38, Linux 77c41cdbe6bce476e08d3251c0d501feaf10a9f3, Linux 119dcafe36795a15ae53351cbbd6177aaf94ffef, Linux 29d91820184d5cbc70f3246d4911d96eaeb930d6, Linux 9740890ee20e01f99ff1dde84c63dcf089fabb98. Upgrade Linux to 9740890ee20e01f99ff1dde84c63dcf089fabb98 or later.

### How do I check if I'm affected by CVE-2025-22005?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/16267a5036173d0173377545b4b6021b081d0933>
- patch: <https://git.kernel.org/stable/c/1bd12dfc058e1e68759d313d7727d68dbc1b8964>
- patch: <https://git.kernel.org/stable/c/596a883c4ce2d2e9c175f25b98fed3a1f33fea38>
- patch: <https://git.kernel.org/stable/c/77c41cdbe6bce476e08d3251c0d501feaf10a9f3>
- patch: <https://git.kernel.org/stable/c/119dcafe36795a15ae53351cbbd6177aaf94ffef>
- patch: <https://git.kernel.org/stable/c/29d91820184d5cbc70f3246d4911d96eaeb930d6>
- patch: <https://git.kernel.org/stable/c/d3d5b4b5ae263c3225db363ba08b937e2e2b0380>
- patch: <https://git.kernel.org/stable/c/9740890ee20e01f99ff1dde84c63dcf089fabb98>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-22005>

HTML: <https://flawdb.com/CVE-2025-22005> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-22005>
