linux/net/openvswitch
Zhiling Zou 3f118c8217 openvswitch: avoid reallocating confirmed conntrack labels
ovs_ct_get_conn_labels() adds the labels extension when a conntrack
entry does not have one.  Confirmed conntracks can be read locklessly,
so adding an extension may reallocate and free the extension block
while another CPU accesses it.

Only add the extension for unconfirmed conntracks.  A confirmed
conntrack without labels now fails the caller's label operation instead
of reallocating its extension storage.

Fixes: c2ac667358 ("openvswitch: Allow matching on conntrack label")
Cc: stable@vger.kernel.org
Reported-by: Vega <vega@nebusec.ai>
Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>
Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/372fbb062b40ae6723684f55484be86ff0064f8e.1789218015.git.zhilinz@nebusec.ai
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-15 18:00:46 -07:00
..
actions.c net: openvswitch: fix skb leak on flow key update failure during ct 2026-07-29 17:42:33 -07:00
conntrack.c openvswitch: avoid reallocating confirmed conntrack labels 2026-09-15 18:00:46 -07:00
conntrack.h openvswitch: Fix CT limit teardown use-after-free 2026-08-24 11:38:09 -07:00
datapath.c openvswitch: only skb_tx_error() a packet we are about to drop 2026-08-25 09:36:47 +02:00
datapath.h openvswitch: Fix CT limit teardown use-after-free 2026-08-24 11:38:09 -07:00
dp_notify.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
drop.h net: openvswitch: add misc error drop reasons 2023-08-14 08:01:06 +01:00
flow_netlink.c net: openvswitch: reject oversized nested action attrs 2026-07-11 13:09:11 +02:00
flow_netlink.h net: openvswitch: remove never-working support for setting nsh fields 2025-11-14 18:13:24 -08:00
flow_table.c net: openvswitch: fix use-after-free of the flow table mask array 2026-09-08 17:24:10 -07:00
flow_table.h net: openvswitch: Annotate struct mask_array with __counted_by 2023-10-17 13:56:03 +02:00
flow.c openvswitch: fix wrong flag value in get_ipv6_ext_hdrs() 2026-09-10 08:51:30 -07:00
flow.h net: openvswitch: reduce cpu_used_mask memory 2023-02-06 22:36:29 -08:00
Kconfig openvswitch: remove support for legacy tunnel types 2026-08-06 15:09:23 +02:00
Makefile openvswitch: remove support for legacy tunnel types 2026-08-06 15:09:23 +02:00
meter.c net: openvswitch: fix potential UAF on meter attach failure 2026-07-30 13:20:03 +02:00
meter.h net: openvswitch: remove unnecessary linux/genetlink.h include 2024-04-01 21:44:34 -07:00
openvswitch_trace.c openvswitch: add trace points 2021-06-22 10:47:32 -07:00
openvswitch_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
vport-internal_dev.c net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
vport-internal_dev.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 269 2019-06-05 17:30:29 +02:00
vport-netdev.c openvswitch: remove support for legacy tunnel types 2026-08-06 15:09:23 +02:00
vport-netdev.h openvswitch: remove support for legacy tunnel types 2026-08-06 15:09:23 +02:00
vport.c net: openvswitch: unexport ovs_vport_alloc/free 2026-08-13 18:33:35 -07:00
vport.h openvswitch: vport: remove infrastructure for separate modules 2026-08-06 15:09:23 +02:00