[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240304155021.GH403078@kernel.org>
Date: Mon, 4 Mar 2024 15:50:21 +0000
From: Simon Horman <horms@...nel.org>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, lars.povlsen@...rochip.com,
Steen.Hegelund@...rochip.com, daniel.machon@...rochip.com,
UNGLinuxDriver@...rochip.com, bjarni.jonasson@...rochip.com,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: sparx5: Fix use after free inside
sparx5_del_mact_entry
On Fri, Mar 01, 2024 at 09:06:08AM +0100, Horatiu Vultur wrote:
> 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@...rochip.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists