Thread (9 messages) 9 messages, 5 authors, 2024-12-16

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

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help