net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases
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
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.16, 6.13.4
- CVEs
- CVE-2025-21788
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 00:48 UTC · Revision 1
Source evidence
net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases
core-osv · Original sourcePublished 27 Feb 2025, 02:18 UTC
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
osv:CVE-2025-21788
Kernel
Fixed versions: 6.12.16, 6.13.4
Complete source record
{
"id": "e907d94f83b12fd160ea8b64de476eed208120abdd64877bbe52f5e0c1a43afb",
"url": "https://osv.dev/vulnerability/CVE-2025-21788",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases",
"summary": "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",
"evidence": "osv:CVE-2025-21788",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.16",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-21788",
"aliases": [
"CVE-2025-21788"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "8acacc40f7337527ff84cd901ed2ef0a2b95b2b6"
},
{
"fixed": "1bba1d042107167164a0ae3a843fdf650ab005d7"
},
{
"fixed": "dc11f049612b9d926aca2e55f8dc9d82850d0da3"
},
{
"fixed": "5db843258de1e4e6b1ef1cbd1797923c9e3de548"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21788.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.10.0"
},
{
"fixed": "6.12.16"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21788.json"
}
}
],
"modified": "2026-10-28T02:30:52.501463420Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/1bba1d042107167164a0ae3a843fdf650ab005d7",
"https://git.kernel.org/stable/c/5db843258de1e4e6b1ef1cbd1797923c9e3de548",
"https://git.kernel.org/stable/c/dc11f049612b9d926aca2e55f8dc9d82850d0da3",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21788.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-21788",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21788.json"
}
},
"related_cves": [
{
"value": "CVE-2025-21788",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 521088,
"published_at": "2025-02-27T02:18:27.336+00:00"
}