CVE-2025-21788: 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
Security readout for executives and security teams
Plain-English summary
A memory leak in the Linux TI AM65 CPSW Ethernet driver can consume available memory when an attached XDP program rejects network traffic. Sustained triggering could reduce availability or crash an affected system. The issue does not expose or alter data according to the supplied CVSS assessment.
Executive priority
Prioritize embedded, industrial, or network-facing systems using this specific TI driver and XDP. Patch promptly where both conditions exist, especially on availability-critical assets. Systems without the driver or without attached XDP are unlikely to reach the vulnerable path based on the supplied description.
Technical view
The driver allocated socket-buffer memory before evaluating XDP. When the XDP result was not XDP_PASS, that allocation was not released. The correction evaluates XDP first and allocates the buffer only for XDP_PASS. CVE records classify this as CWE-401 with CVSS 3.1 score 7.5, reflecting remotely reachable availability impact.
Likely exposure
Exposure requires Linux using the TI AM65 CPSW Ethernet driver with an XDP program attached. The record identifies Linux 6.10, 6.12.16, 6.13.4, and 6.14 as affected, but its version presentation is incomplete or ambiguous. Distribution backports may change actual exposure.
Exploitation context
The supplied record marks this CVE as absent from KEV and provides no evidence of active exploitation. Its CVSS vector describes network-reachable, unauthenticated, low-complexity availability impact. However, the sources do not establish a practical attack rate, required traffic conditions, public exploit availability, or observed incidents.
Researcher notes
The vulnerable path is conditional: am65_cpsw_build_skb() allocates memory that leaks when XDP returns anything other than XDP_PASS. The fix reorders allocation after XDP evaluation and reportedly improves XDP_DROP throughput. Exact affected-version boundaries and commit-to-branch mappings should be confirmed from vendor or distribution advisories.
Mitigation direction
Install a vendor-supported kernel containing the referenced stable fix or an equivalent backport.
Check distribution and device-vendor advisories for corrected package versions.
Where operationally acceptable, avoid attaching XDP programs to affected interfaces until patched.
Monitor affected systems for abnormal memory growth, pressure, or availability degradation.
Validation and detection
Inventory systems using the TI AM65 CPSW Ethernet driver.
Determine whether an XDP program is attached to each affected interface.
Compare installed kernels with vendor advisories and documented backports.
Verify the deployed kernel includes an applicable referenced stable commit or equivalent fix.
Review memory telemetry during representative XDP non-pass traffic handling.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-401: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-401 · source CWE mapping
Missing Release of Memory after Effective Lifetime
Missing Release of Memory after Effective Lifetime represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.