net: ti: icssg-prueth: Fix memory leak in XDP_DROP for non-zero-copy mode
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ti: icssg-prueth: Fix memory leak in XDP_DROP for non-zero-copy mode
Page recycling was removed from the XDP_DROP path in emac_run_xdp() to avoid conflicts with AF_XDP zero-copy mode, which uses xsk_buff_free() instead.
However, this causes a memory leak when running XDP programs that drop packets in non-zero-copy mode (standard page pool mode). The pages are never returned to the page pool, leading to OOM conditions.
Fix this by handling cleanup in the caller, emac_rx_packet(). When emac_run_xdp() returns ICSSG_XDP_CONSUMED for XDP_DROP, the caller now recycles the page back to the page pool. The zero-copy path, emac_rx_packet_zc() already handles cleanup correctly with xsk_buff_free().
From the CVE record · Linux
The Linux kernel's ICSSG PRU Ethernet driver leaks pages when an XDP program drops packets in non-zero-copy mode. Repeated packet drops can exhaust memory and cause an out-of-memory condition. The input does not establish whether an attacker needs authentication or user interaction to trigger this.
Engineers running the Linux kernel with the ICSSG PRU Ethernet driver and XDP in non-zero-copy mode should check their deployments; affected versions were not provided.