Skip to contentSkip to conversation

CVE-2026-98571: net: stmmac: clear stale buf->page after recycling on skb build failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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.

The Linux kernel CVE team has assigned CVE-2026-98571 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.14 with commit df542f669307918f054a17878ff6dd1ddbb2fe18 and fixed in 6.18.55 with commit 501baaeca7d128fa0a2f6953cf5873c5b0d7cf89
	Issue introduced in 6.14 with commit df542f669307918f054a17878ff6dd1ddbb2fe18 and fixed in 7.2.9 with commit 298673397ea3f6f5811b84f0d9f71eac71dda2e3
	Issue introduced in 6.14 with commit df542f669307918f054a17878ff6dd1ddbb2fe18 and fixed in 7.3-rc5 with commit 0a7822e34a0bfde31b194ac3da3253e5032b44cc

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98571

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/501baaeca7d128fa0a2f6953cf5873c5b0d7cf89
	https://git.kernel.org/stable/c/298673397ea3f6f5811b84f0d9f71eac71dda2e3
	https://git.kernel.org/stable/c/0a7822e34a0bfde31b194ac3da3253e5032b44cc