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

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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.67% (percentile 47, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-02-27T02:18:27.336Z
- **Modified:** 2026-08-05T11:54:25.991Z

## Who should check

- Anyone running Linux \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 1bba1d042107167164a0ae3a843fdf650ab005d7; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< dc11f049612b9d926aca2e55f8dc9d82850d0da3; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 5db843258de1e4e6b1ef1cbd1797923c9e3de548
- Anyone running Linux 6.10

## 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

## Affected and fixed versions

- Linux: \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 1bba1d042107167164a0ae3a843fdf650ab005d7; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< dc11f049612b9d926aca2e55f8dc9d82850d0da3; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 5db843258de1e4e6b1ef1cbd1797923c9e3de548 (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- Upgrade Linux to 5db843258de1e4e6b1ef1cbd1797923c9e3de548 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-21788. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21788.md
Affected: Linux >= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, < 1bba1d042107167164a0ae3a843fdf650ab005d7; >= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, < dc11f049612b9d926aca2e55f8dc9d82850d0da3; >= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, < 5db843258de1e4e6b1ef1cbd1797923c9e3de548; Linux 6.10
Fixed in: Linux 1bba1d042107167164a0ae3a843fdf650ab005d7, Linux 5db843258de1e4e6b1ef1cbd1797923c9e3de548

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

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

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

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 1bba1d042107167164a0ae3a843fdf650ab005d7; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< dc11f049612b9d926aca2e55f8dc9d82850d0da3; \>= 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6, \< 5db843258de1e4e6b1ef1cbd1797923c9e3de548; Linux 6.10.

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

Yes. Fixed in Linux 1bba1d042107167164a0ae3a843fdf650ab005d7, Linux 5db843258de1e4e6b1ef1cbd1797923c9e3de548. Upgrade Linux to 5db843258de1e4e6b1ef1cbd1797923c9e3de548 or later.

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

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/1bba1d042107167164a0ae3a843fdf650ab005d7>
- patch: <https://git.kernel.org/stable/c/dc11f049612b9d926aca2e55f8dc9d82850d0da3>
- patch: <https://git.kernel.org/stable/c/5db843258de1e4e6b1ef1cbd1797923c9e3de548>

## 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-21788>

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