Skip to contentSkip to conversation

CVE-2026-98492: net: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths

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: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths

Fix 3 leaks in macb_alloc() error paths:
- Tx buffer allocated but crossing a 4G boundary: Tx leaked.
- Rx buffer allocation fails: Tx leaked.
- Rx buffer allocated but crossing a 4G boundary: Tx & Rx leaked.

This is because our error handling calls macb_free(bp) which in turn frees the buffers stored in bp->queues[0], but nothing has been stored in there. Fix by storing allocated buffers into bp->queues[0] ASAP.

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

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

	Issue introduced in 6.18 with commit 78d901897b3cae06b38f54e48a2378cf9da21175 and fixed in 6.18.55 with commit bda487567d0b7b15dfa876511085c0666b9efad5
	Issue introduced in 6.18 with commit 78d901897b3cae06b38f54e48a2378cf9da21175 and fixed in 7.2.9 with commit 259e6cbb6a097da8ced544ee92a6fbde35aa1338
	Issue introduced in 6.18 with commit 78d901897b3cae06b38f54e48a2378cf9da21175 and fixed in 7.3-rc5 with commit 23d42b9a3bcd55b17d3b371544fedc708c2397e9
	Issue introduced in 6.17.3 with commit 982a4d9a2e12b693f684eff943043a607628d871

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

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/cadence/macb_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/bda487567d0b7b15dfa876511085c0666b9efad5
	https://git.kernel.org/stable/c/259e6cbb6a097da8ced544ee92a6fbde35aa1338
	https://git.kernel.org/stable/c/23d42b9a3bcd55b17d3b371544fedc708c2397e9