Re: [PATCH v2] net: arc_emac: Fix use after free in arc_mdio_probe()

From: patchwork-bot+netdevbpf
Date: Thu Mar 10 2022 - 18:00:17 EST


Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Wed, 9 Mar 2022 20:18:24 +0800 you wrote:
> If bus->state is equal to MDIOBUS_ALLOCATED, mdiobus_free(bus) will free
> the "bus". But bus->name is still used in the next line, which will lead
> to a use after free.
>
> We can fix it by putting the name in a local variable and make the
> bus->name point to the rodata section "name",then use the name in the
> error message without referring to bus to avoid the uaf.
>
> [...]

Here is the summary with links:
- [v2] net: arc_emac: Fix use after free in arc_mdio_probe()
https://git.kernel.org/netdev/net/c/bc0e610a6eb0

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html