CVE-2025-22005

ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().

5.5 medium EPSS 0.22%

Published 3 Apr 2025 Updated 10 Nov 2026 CNA: Linux

Check your servers for CVE-2025-22005

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-22005 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

5.5 medium CVSS 3.1 from CISA (ADP)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.2% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 1 Oct 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

  • CWE-401 Missing Release of Memory after Effective Lifetime

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 16267a5036173d0173377545b4b6021b081d0933
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 1bd12dfc058e1e68759d313d7727d68dbc1b8964
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 596a883c4ce2d2e9c175f25b98fed3a1f33fea38
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 77c41cdbe6bce476e08d3251c0d501feaf10a9f3
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 119dcafe36795a15ae53351cbbd6177aaf94ffef
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 29d91820184d5cbc70f3246d4911d96eaeb930d6
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before d3d5b4b5ae263c3225db363ba08b937e2e2b0380
affected from 7dd73168e273938b9e9bb42ca51b0c27d807992b, before 9740890ee20e01f99ff1dde84c63dcf089fabb98
Other versions: unaffected
Linux
affected 5.3
unaffected before 5.3
unaffected from 5.4.292 up to and including 5.4.*
unaffected from 5.10.236 up to and including 5.10.*
unaffected from 5.15.180 up to and including 5.15.*
unaffected from 6.1.132 up to and including 6.1.*
unaffected from 6.6.85 up to and including 6.6.*
unaffected from 6.12.21 up to and including 6.12.*
unaffected from 6.13.9 up to and including 6.13.*
unaffected 6.14 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-22005 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-22005

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-22005
trivy image --scanners vuln IMAGE | grep CVE-2025-22005

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-22005 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.