Linux: net: stmmac: clear stale buf->page after recycling on skb build failure
What fixes it
- 501baaeca7d128fa0a2f6953cf5873c5b0d7cf89LinuxCVE List
- 298673397ea3f6f5811b84f0d9f71eac71dda2e3LinuxCVE List
- 0a7822e34a0bfde31b194ac3da3253e5032b44ccLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In 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.
Text from CVE List
Affected versions 8
- Linuxaffected: df542f669307918f054a17878ff6dd1ddbb2fe18 before 501baaeca7d128fa0a2f6953cf5873c5b0d7cf89CVE List
- Linuxaffected: df542f669307918f054a17878ff6dd1ddbb2fe18 before 298673397ea3f6f5811b84f0d9f71eac71dda2e3CVE List
- Linuxaffected: df542f669307918f054a17878ff6dd1ddbb2fe18 before 0a7822e34a0bfde31b194ac3da3253e5032b44ccCVE List
- Linuxaffected: 6.14CVE List
- Linuxunaffected: all versions before 6.14CVE List
- Linuxunaffected: 6.18.55 through 6.18.*CVE List
- Linuxunaffected: 7.2.9 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List