kernel_samsung_a53x/net/openvswitch
Hyunwoo Kim 0804f9bc42 net: openvswitch: Fix Use-After-Free in ovs_ct_exit
[ Upstream commit 5ea7b72d4fac2fdbc0425cd8f2ea33abe95235b2 ]

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: 11efd5cb04a1 ("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-11-19 11:32:37 +01:00
..
actions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
conntrack.c net: openvswitch: Fix Use-After-Free in ovs_ct_exit 2024-11-19 11:32:37 +01:00
conntrack.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datapath.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datapath.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dp_notify.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow_netlink.c net: openvswitch: limit the number of recursions from action sets 2024-11-18 12:13:28 +01:00
flow_netlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow_table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow_table.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meter.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-geneve.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-gre.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-internal_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-internal_dev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-netdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-netdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport-vxlan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vport.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00