CVE-2026-98908: net: microchip: sparx5: clean up PSFP resources on flower setup failure
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: microchip: sparx5: clean up PSFP resources on flower setup failure
sparx5_tc_flower_psfp_setup() allocates PSFP stream gate, flow meter and stream filter resources before adding VCAP actions. If a later step fails, the resources allocated earlier in the function are not unwound.
Add error paths to release the stream filter, flow meter and stream gate when setup fails after they have been acquired.
Also make sparx5_psfp_fm_add() return the acquired flow-meter id before the existing-flow-meter early return. When an existing flow meter is reused, sparx5_psfp_fm_get() increments its pool reference count, but the caller previously kept psfp_fmid as 0. If a later setup step failed, the error path could try to delete flow-meter id 0 instead of the reused flow meter, leaving the incremented reference behind.
The Linux kernel CVE team has assigned CVE-2026-98908 to this issue.
Affected and fixed versions
===========================
Fixed in 6.6.158 with commit a7625d408f7f0535c2b0f05d53231d6496acd48b Fixed in 6.12.111 with commit a46ea3f7ee0d3ad3d5e92043232b293be2a305d3 Fixed in 6.18.53 with commit 640c1bd8d359ad34817f5afec0872985e87b49ec Fixed in 7.2 with commit 46e50367338702abe3df661df7795bdada40fef7
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-98908
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_psfp.c drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.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/a7625d408f7f0535c2b0f05d53231d6496acd48b https://git.kernel.org/stable/c/a46ea3f7ee0d3ad3d5e92043232b293be2a305d3 https://git.kernel.org/stable/c/640c1bd8d359ad34817f5afec0872985e87b49ec https://git.kernel.org/stable/c/46e50367338702abe3df661df7795bdada40fef7