linux/net/openvswitch
Yang Yang 546b68ac89 openvswitch: validate MPLS set/set_masked payload length
validate_set() accepted OVS_KEY_ATTR_MPLS as variable-sized payload for
SET/SET_MASKED actions. In action handling, OVS expects fixed-size
MPLS key data (struct ovs_key_mpls).

Use the already normalized key_len (masked case included) and reject
non-matching MPLS action key sizes.

Reject invalid MPLS action payload lengths early.

Fixes: fbdcdd78da ("Change in Openvswitch to support MPLS label depth of 3 in ingress direction")
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Tested-by: Ao Zhou <n05ec@lzu.edu.cn>
Co-developed-by: Yuan Tan <tanyuan98@outlook.com>
Signed-off-by: Yuan Tan <tanyuan98@outlook.com>
Suggested-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Yang Yang <n05ec@lzu.edu.cn>
Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
Link: https://patch.msgid.link/20260319080228.3423307-1-n05ec@lzu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-20 18:37:31 -07:00
..
Kconfig sctp: use skb_crc32c() instead of __skb_checksum() 2025-05-21 15:40:16 -07:00
Makefile
actions.c net: openvswitch: remove never-working support for setting nsh fields 2025-11-14 18:13:24 -08:00
conntrack.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
conntrack.h
datapath.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
datapath.h net: openvswitch: allow providing upcall pid for the 'execute' command 2025-07-07 14:30:39 -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
flow.c net: openvswitch: Use for_each_cpu() where appropriate 2025-08-20 19:47:22 -07:00
flow.h
flow_netlink.c openvswitch: validate MPLS set/set_masked payload length 2026-03-20 18:37:31 -07: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 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
flow_table.h
meter.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
meter.h
openvswitch_trace.c
openvswitch_trace.h
vport-geneve.c
vport-gre.c
vport-internal_dev.c
vport-internal_dev.h
vport-netdev.c openvswitch: defer tunnel netdev_put to RCU release 2026-03-20 18:36:29 -07:00
vport-netdev.h
vport-vxlan.c
vport.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vport.h net: openvswitch: fix kernel-doc warnings in internal headers 2025-03-24 09:30:21 -07:00