linux-stable/net/openvswitch
Hyunwoo Kim 35880c3fa6 net: openvswitch: Fix Use-After-Free in ovs_ct_exit
[ Upstream commit 5ea7b72d4f ]

Since kfree_rcu, which is called in the hlist_for_each_entry_rcu traversal
of ovs_ct_limit_exit, is not part of the RCU read critical section, it
is possible that the RCU grace period will pass during the traversal and
the key will be free.

To prevent this, it should be changed to hlist_for_each_entry_safe.

Fixes: 11efd5cb04 ("openvswitch: Support conntrack zone limit")
Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://lore.kernel.org/r/ZiYvzQN/Ry5oeFQW@v4bel-B760M-AORUS-ELITE-AX
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:23:41 +02:00
..
Kconfig
Makefile
actions.c net: openvswitch: fix misuse of the cached connection on tuple changes 2022-06-22 14:13:20 +02:00
conntrack.c net: openvswitch: Fix Use-After-Free in ovs_ct_exit 2024-05-02 16:23:41 +02:00
conntrack.h
datapath.c net: openvswitch: fix flow memory leak in ovs_flow_cmd_new 2023-02-15 17:22:14 +01:00
datapath.h
dp_notify.c
flow.c net: openvswitch: fix parsing of nw_proto for IPv6 fragments 2022-06-29 08:59:45 +02:00
flow.h
flow_netlink.c net: openvswitch: limit the number of recursions from action sets 2024-02-23 08:42:23 +01:00
flow_netlink.h
flow_table.c
flow_table.h
meter.c net: openvswitch: fix possible memory leak in ovs_meter_cmd_set() 2023-02-22 12:55:57 +01:00
meter.h
vport-geneve.c
vport-gre.c
vport-internal_dev.c
vport-internal_dev.h
vport-netdev.c
vport-netdev.h
vport-vxlan.c
vport.c ovs: clear skb->tstamp in forwarding path 2021-08-26 08:35:50 -04:00
vport.h