[PATCH net v2] net: airoha: fix potential use-after-free in airoha_npu_get()
patchwork-bot+netdevbpf at kernel.org
patchwork-bot+netdevbpf at kernel.org
Wed Jul 16 16:20:06 PDT 2025
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba at kernel.org>:
On Tue, 15 Jul 2025 07:30:58 -0700 you wrote:
> np->name was being used after calling of_node_put(np), which
> releases the node and can lead to a use-after-free bug.
> Previously, of_node_put(np) was called unconditionally after
> of_find_device_by_node(np), which could result in a use-after-free if
> pdev is NULL.
>
> This patch moves of_node_put(np) after the error check to ensure
> the node is only released after both the error and success cases
> are handled appropriately, preventing potential resource issues.
>
> [...]
Here is the summary with links:
- [net,v2] net: airoha: fix potential use-after-free in airoha_npu_get()
https://git.kernel.org/netdev/net/c/3cd582e7d078
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the linux-arm-kernel
mailing list