CVE-2025-21788 net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases

High 7.5 Published Updated

A memory leak in the TI AM65-CPSW Ethernet driver allows attackers to exhaust system memory via XDP processing, causing 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-21788?

CVE-2025-21788 is a high-severity denial of service vulnerability in Linux kernel, published on 27 Feb 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:

net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases

If the XDP program doesn't result in XDP_PASS then we leak the memory allocated by am65_cpsw_build_skb().

It is pointless to allocate SKB memory before running the XDP program as we would be wasting CPU cycles for cases other than XDP_PASS. Move the SKB allocation after evaluating the XDP program result.

This fixes the memleak. A performance boost is seen for XDP_DROP test.

XDP_DROP test: Before: 460256 rx/s 0 err/s After: 784130 rx/s 0 err/s

Weakness: CWE-401

Which versions are affected by CVE-2025-21788?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21788?

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-21788 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21788, DEBIAN-CVE-2025-21788, GHSA-2qj8-c2v4-6cg6, UBUNTU-CVE-2025-21788.

Is CVE-2025-21788 in your software?

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

Check your SBOMs for free