]> 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 13:01:43 +0000 (14:01 +0100)
commita849a10de5e04d798f7f286a2f1ca174719a617a
tree50bedc613e8a09dab4b4a1c144154e386094f8ba
parent01d1b5c9abcaff29a43f1d17a19c33eec92c7dbe
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