CVE-2026-99029: net: sparx5: free the matchall entry on destroy
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: sparx5: free the matchall entry on destroy
sparx5_tc_matchall_replace() allocates a struct sparx5_mall_entry for every offloaded matchall filter and adds it to sparx5->mall_entries. sparx5_tc_matchall_destroy() removes the entry from the list, but never frees it, so the entry of every deleted mirror and goto matchall filter is leaked.
Free the entry after unlinking it.
The leak was discovered by an AI code review agent, and reproduced with kmemleak on a lan969x EV board (EV23X71A) by repeatedly adding and deleting matchall mirror and goto filters. With the fix, kmemleak no longer reports the leak.
The Linux kernel CVE team has assigned CVE-2026-99029 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.10 with commit 1ede4acf045ced70d9b72465e2e968aec71e0a42 and fixed in 6.12.113 with commit fa0c27d9e17ee2e46d4b8274a6fde706f0d6725e Issue introduced in 6.10 with commit 1ede4acf045ced70d9b72465e2e968aec71e0a42 and fixed in 6.18.57 with commit cc7cc5955d22ea90555f09a680d4bf56d4a0c24a Issue introduced in 6.10 with commit 1ede4acf045ced70d9b72465e2e968aec71e0a42 and fixed in 7.2.11 with commit 44efb6d92dd5a2b1dd9553d92ef0eebde135fc6e Issue introduced in 6.10 with commit 1ede4acf045ced70d9b72465e2e968aec71e0a42 and fixed in 7.3 with commit 2b82e16d6084cbc651e3c902198f1945408ee1a5
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-99029
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/microchip/sparx5/sparx5_tc_matchall.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/fa0c27d9e17ee2e46d4b8274a6fde706f0d6725e https://git.kernel.org/stable/c/cc7cc5955d22ea90555f09a680d4bf56d4a0c24a https://git.kernel.org/stable/c/44efb6d92dd5a2b1dd9553d92ef0eebde135fc6e https://git.kernel.org/stable/c/2b82e16d6084cbc651e3c902198f1945408ee1a5