Skip to contentSkip to conversation

CVE-2026-31658: net: altera-tse: fix skb leak on DMA mapping error in tse_start_xmit()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 24

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: altera-tse: fix skb leak on DMA mapping error in tse_start_xmit()

When dma_map_single() fails in tse_start_xmit(), the function returns NETDEV_TX_OK without freeing the skb. Since NETDEV_TX_OK tells the stack the packet was consumed, the skb is never freed, leaking memory on every DMA mapping failure.

Add dev_kfree_skb_any() before returning to properly free the skb.

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

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

	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 5.10.253 with commit ae2cd46f57f422b51aedd406ff5d75cbff401d5d
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 5.15.203 with commit cb1d318702fdf643061350d164250198df4116f2
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 6.1.169 with commit d5ec406f0543bd6cdfd563b08015fdec8c4d5712
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 6.6.135 with commit 2eb9d67704ca8f1101f7435b85f113ede471f9f2
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 6.12.82 with commit 9f3ec44aeb58501d11834048d5d0dbaeacb6d4e7
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 6.18.23 with commit 60f462cd2716d86bd2174f9d5e035c9278f30480
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 6.19.13 with commit 3aca300e88afe56afb000cdc4c65383014fb17f9
	Issue introduced in 3.15 with commit bbd2190ce96d8fce031f0526c1f970b68adc9d1a and fixed in 7.0 with commit 6dede3967619b5944003227a5d09fdc21ed57d10

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-31658

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/altera/altera_tse_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/ae2cd46f57f422b51aedd406ff5d75cbff401d5d
	https://git.kernel.org/stable/c/cb1d318702fdf643061350d164250198df4116f2
	https://git.kernel.org/stable/c/d5ec406f0543bd6cdfd563b08015fdec8c4d5712
	https://git.kernel.org/stable/c/2eb9d67704ca8f1101f7435b85f113ede471f9f2
	https://git.kernel.org/stable/c/9f3ec44aeb58501d11834048d5d0dbaeacb6d4e7
	https://git.kernel.org/stable/c/60f462cd2716d86bd2174f9d5e035c9278f30480
	https://git.kernel.org/stable/c/3aca300e88afe56afb000cdc4c65383014fb17f9
	https://git.kernel.org/stable/c/6dede3967619b5944003227a5d09fdc21ed57d10