CVE-2025-40183 bpf: Fix metadata_dst leak __bpf_redirect_neigh_v{4,6}

High 7.5 Published Updated

A memory leak in the Linux kernel's BPF redirect helper can exhaust kernel memory, leading to denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40183?

CVE-2025-40183 is a high-severity denial of service vulnerability in Linux, published on 12 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

bpf: Fix metadata_dst leak __bpf_redirect_neigh_v{4,6}

Cilium has a BPF egress gateway feature which forces outgoing K8s Pod traffic to pass through dedicated egress gateways which then SNAT the traffic in order to interact with stable IPs outside the cluster.

The traffic is directed to the gateway via vxlan tunnel in collect md mode. A recent BPF change utilized the bpf_redirect_neigh() helper to forward packets after the arrival and decap on vxlan, which turned out over time that the kmalloc-256 slab usage in kernel was ever-increasing.

The issue was that vxlan allocates the metadata_dst object and attaches it through a fake dst entry to the skb. The latter was never released though given bpf_redirect_neigh() was merely setting the new dst entry via skb_dst_set() without dropping an existing one first.

Which versions are affected by CVE-2025-40183?

How do I fix CVE-2025-40183?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-40183 being exploited?

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

Sources

Also known as BELL-CVE-2025-40183, DEBIAN-CVE-2025-40183, GHSA-553v-hjpm-738q, ROOT-OS-UBUNTU-2404-CVE-2025-40183, UBUNTU-CVE-2025-40183.

Is CVE-2025-40183 in your software?

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

Check your SBOMs for free