CVE-2022-50043 net: fix potential refcount leak in ndisc_router_discovery()

Medium 5.5 Published Updated

A refcount leak in the Linux kernel's IPv6 neighbor discovery can lead to memory exhaustion and denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50043?

CVE-2022-50043 is a medium-severity memory corruption vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

net: fix potential refcount leak in ndisc_router_discovery()

The issue happens on specific paths in the function. After both the object `rt` and `neigh` are grabbed successfully, when `lifetime` is nonzero but the metric needs change, the function just deletes the route and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh` again if above conditions hold. The function simply overwrite `neigh` if succeeds or returns if fails, without decreasing the reference count of previous `neigh`. This may result in memory leaks.

Fix it by decrementing the reference count of `neigh` in place.

Which versions are affected by CVE-2022-50043?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50043?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-50043 being exploited?

There is no known exploitation of CVE-2022-50043 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50043, GHSA-m333-mmjw-m2wg, UBUNTU-CVE-2022-50043.

Is CVE-2022-50043 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free