CVE-2026-98131: net: stmmac: fix dma mapping leak in stmmac_tso_xmit()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix dma mapping leak in stmmac_tso_xmit()
In stmmac_tso_xmit(), if the DMA mapping of an skb fragment fails, the frame is dropped but the DMA mappings already created for the linear part and for the fragments mapped before the failure are never unmapped, leaking DMA mappings.
Fix the leak by walking back over the descriptors used by the frame and releasing each of them with stmmac_free_tx_buffer(). Moreover, release the descriptors with stmmac_release_tx_desc() unmapping the DMA buffers.
The Linux kernel CVE team has assigned CVE-2026-98131 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.7 with commit f748be531d7012c456b97f66091d86b3675c5fef and fixed in 7.2.7 with commit e85adaac3dc6317cae902372c6849189ec62cf7d Issue introduced in 4.7 with commit f748be531d7012c456b97f66091d86b3675c5fef and fixed in 7.3-rc2 with commit a5d946466a95621fa2769720d59ea336003aa1a5
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-98131
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/e85adaac3dc6317cae902372c6849189ec62cf7d https://git.kernel.org/stable/c/a5d946466a95621fa2769720d59ea336003aa1a5