net: stmmac: clear stale buf->page after recycling on skb build failure
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 |
|
|
6.18.557.2.97.3In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: clear stale buf->page after recycling on skb build failure
In stmmac_rx(), when napi_build_skb() fails the descriptor page is recycled back to the page pool with page_pool_recycle_direct(), but buf->page is left pointing at the recycled page, unlike every other consumption site in the function which clears the pointer after handing the page away.
With the stale pointer stmmac_rx_refill() skips the replacement allocation and programs the already-recycled page back into the RX descriptor.
Clear buf->page on the napi_build_skb() failure path to keep the buffer lifecycle consistent with the other consumption sites.
From the CVE record · Linux
In the Linux kernel's stmmac receive path, a failure in napi_build_skb() can leave a pointer to a page that has already been recycled. The refill path can then program that page back into an RX descriptor. The input does not specify an attacker-controlled trigger, authentication requirement, or resulting security impact.
Engineers running Linux kernels with the stmmac driver should check whether their kernel includes this fix; affected versions are not specified.