CVE-2026-143343: net: stmmac: copy XDP metadata in AF_XDP zero-copy RX
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: copy XDP metadata in AFXDP zero-copy RX
stmmacconstructskbzc() reserves headroom for the XDP metadata and records the length reported by the XDP program, but only copies the packet data starting at xdp->data. The bytes in [xdp->datameta, xdp->data) are never copied into the new skb, so the skb advertises metadata that is not there: after ethtypetrans() anchors macheader, datameta points at uninitialized headroom instead of what the program wrote.
Copy the metadata together with the packet data starting at xdp->datameta, leaving skb->data at the start of the frame and the metadata immediately before it, and record its length. This keeps datameta valid for the stack and TC BPF after ethtypetrans() anchors macheader.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In stmmac_construct_skb_zc(), copy the XDP metadata bytes from xdp->data_meta to xdp->data into the new skb along with the packet data, so the skb contains the metadata its recorded length advertises.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel stmmac Ethernet driver with AF_XDP zero-copy receive processing and XDP programs that write metadata are exposed. The issue affects the path that passes received packets into the networking stack or TC BPF with XDP metadata present.
What must occur for the flaw to be triggered?
An XDP program must provide metadata for a packet received through the stmmac AF_XDP zero-copy RX path. The vulnerable handling then creates an skb whose metadata pointer refers to uninitialized headroom rather than the metadata written by the XDP program.
How can I determine whether a system may already be affected?
Review whether the affected interface uses the stmmac driver, AF_XDP zero-copy RX, and an XDP program that uses data_meta. Systems not using that combination do not exercise the described vulnerable path.
What mitigation is available if the fix cannot be applied immediately?
Avoid using AF_XDP zero-copy RX on stmmac interfaces when XDP programs write or rely on packet metadata. Alternatively, avoid passing such metadata into the stack or TC BPF until the kernel includes the fix.