linux-stable/drivers/net/ethernet/microchip
Horatiu Vultur 89d72d4125 net: sparx5: Fix use after free inside sparx5_del_mact_entry
Based on the static analyzis of the code it looks like when an entry
from the MAC table was removed, the entry was still used after being
freed. More precise the vid of the mac_entry was used after calling
devm_kfree on the mac_entry.
The fix consists in first using the vid of the mac_entry to delete the
entry from the HW and after that to free it.

Fixes: b37a1bae74 ("net: sparx5: add mactable support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240301080608.3053468-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-03-04 20:38:22 -08:00
..
lan966x lan966x: Fix crash when adding interface under a lag 2024-02-09 13:47:47 -08:00
sparx5 net: sparx5: Fix use after free inside sparx5_del_mact_entry 2024-03-04 20:38:22 -08:00
vcap net: microchip: sparx5: clean up error checking in vcap_show_admin() 2023-10-03 07:13:32 -07:00
Kconfig net: lan743x: also select PHYLIB 2023-10-05 09:10:18 -07:00
Makefile net: microchip: sparx5: Adding initial tc flower support for VCAP API 2022-10-24 10:37:43 +01:00
enc28j60.c net: enc28j60: Use threaded interrupt instead of workqueue 2023-05-11 18:00:37 -07:00
enc28j60_hw.h
encx24j600-regmap.c net: encx24j600: Fix invalid logic in reading of MISTAT register 2022-12-05 09:46:31 +00:00
encx24j600.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
encx24j600_hw.h
lan743x_ethtool.c lan743x: remove redundant statement in lan743x_ethtool_get_eee 2024-01-08 19:17:44 -08:00
lan743x_ethtool.h net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips 2022-11-09 19:20:13 -08:00
lan743x_main.c net: microchip: lan743x: improve throughput with rx timestamp config 2023-10-24 09:16:08 +02:00
lan743x_main.h net: microchip: lan743x : bidirectional throughput improvement 2023-11-20 17:47:30 -08:00
lan743x_ptp.c net: microchip: lan743x: improve throughput with rx timestamp config 2023-10-24 09:16:08 +02:00
lan743x_ptp.h net: lan743x: Add support for PTP-IO Event Output (Periodic Output) 2022-03-18 12:53:23 +00:00