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

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Published: 2025-02-27T02:18:27.336Z
- Modified: 2026-08-05T11:54:25.991Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 before 1bba1d042107167164a0ae3a843fdf650ab005d7; from 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 before dc11f049612b9d926aca2e55f8dc9d82850d0da3; from 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 before 5db843258de1e4e6b1ef1cbd1797923c9e3de548; 6.10 (not affected: before 6.10; from 6.12.16 up to 6.12.*; from 6.13.4 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.10 before 6.12.16; from 6.13 before 6.13.4; 6.14

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/1bba1d042107167164a0ae3a843fdf650ab005d7> (mailing-list, patch)
- <https://git.kernel.org/stable/c/dc11f049612b9d926aca2e55f8dc9d82850d0da3> (mailing-list, patch)
- <https://git.kernel.org/stable/c/5db843258de1e4e6b1ef1cbd1797923c9e3de548> (mailing-list, patch)

## Sources

- CVE List: [CVE-2025-21788](https://www.cve.org/CVERecord?id=CVE-2025-21788), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21788](https://nvd.nist.gov/vuln/detail/CVE-2025-21788), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21788 · Whole record: https://cve.day/CVE-2025-21788.json · Rebuilt by cve.day 2026-11-25T22:58:54.566Z
