Re: [Patch net v2] rtnetlink: fix double call of rtnl_link_get_net_ifla()
From: patchwork-bot+netdevbpf@kernel.org
Date: 2024-12-03 10:40:15
From: patchwork-bot+netdevbpf@kernel.org
Date: 2024-12-03 10:40:15
Hello: This patch was applied to netdev/net.git (main) by Paolo Abeni [off-list ref]: On Fri, 29 Nov 2024 13:25:19 -0800 you wrote:
From: Cong Wang <redacted> Currently rtnl_link_get_net_ifla() gets called twice when we create peer devices, once in rtnl_add_peer_net() and once in each ->newlink() implementation. This looks safer, however, it leads to a classic Time-of-Check to Time-of-Use (TOCTOU) bug since IFLA_NET_NS_PID is very dynamic. And because of the lack of checking error pointer of the second call, it also leads to a kernel crash as reported by syzbot. [...]
Here is the summary with links:
- [net,v2] rtnetlink: fix double call of rtnl_link_get_net_ifla()
https://git.kernel.org/netdev/net/c/48327566769a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html