Loading
openvswitch: use RCU protection in ovs_vport_cmd_fill_info()
stable inclusion from stable-v6.6.79 commit 8ec57509c36c8b9a23e50b7858dda0c520a2d074 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBXANC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8ec57509c36c8b9a23e50b7858dda0c520a2d074 -------------------------------- [ 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: 9354d452 ("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> (cherry picked from commit 8ec57509c36c8b9a23e50b7858dda0c520a2d074) Signed-off-by:
Wentao Guan <guanwentao@uniontech.com>