]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
openvswitch: use RCU protection in ovs_vport_cmd_fill_info()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Feb 2025 13:58:37 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:50:08 +0000 (13:50 +0100)
commit7e01abc34e87abd091e619161a20f54ed4e3e2da
treed1de61f05c3b07ef5c3a0568b133beff67e15fd8
parentf189654459423d4d48bef2d120b4bfba559e6039
openvswitch: use RCU protection in ovs_vport_cmd_fill_info()

[ Upstream commit 90b2f49a502fa71090d9f4fe29a2f51fe5dff76d ]

ovs_vport_cmd_fill_info() can be called without RTNL or RCU.

Use RCU protection and dev_net_rcu() to avoid potential UAF.

Fixes: 9354d4520342 ("openvswitch: reliable interface indentification in port dumps")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250207135841.1948589-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/datapath.c