]> www.infradead.org Git - users/willy/pagecache.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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 11 Feb 2025 02:09:09 +0000 (18:09 -0800)
commit90b2f49a502fa71090d9f4fe29a2f51fe5dff76d
treedc514d081d83919b3793301d2ed2fc28f0fd9b2e
parenta42b69f692165ec39db42d595f4f65a4c8f42e44
openvswitch: use RCU protection in ovs_vport_cmd_fill_info()

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>
net/openvswitch/datapath.c