summaryrefslogtreecommitdiff
path: root/drivers/ptp
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2024-03-01 09:06:08 +0100
committerJakub Kicinski <kuba@kernel.org>2024-03-04 20:38:22 -0800
commit89d72d4125e94aa3c2140fedd97ce07ba9e37674 (patch)
treedd727108975bc52cc6eb4990868a8be56adcb955 /drivers/ptp
parent948abb59ebd3892c425165efd8fb2f5954db8de7 (diff)
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: b37a1bae742f ("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>
Diffstat (limited to 'drivers/ptp')
0 files changed, 0 insertions, 0 deletions