From: Greg Kroah-Hartman Date: Fri, 9 May 2025 08:58:31 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.15.183~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5a3b966443cd3f8253fde385b6b6972af40e380;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch --- diff --git a/queue-6.12/openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch b/queue-6.12/openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch new file mode 100644 index 0000000000..5ce883e34f --- /dev/null +++ b/queue-6.12/openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch @@ -0,0 +1,36 @@ +From 6beb6835c1fbb3f676aebb51a5fee6b77fed9308 Mon Sep 17 00:00:00 2001 +From: Eelco Chaudron +Date: Tue, 6 May 2025 16:28:54 +0200 +Subject: openvswitch: Fix unsafe attribute parsing in output_userspace() + +From: Eelco Chaudron + +commit 6beb6835c1fbb3f676aebb51a5fee6b77fed9308 upstream. + +This patch replaces the manual Netlink attribute iteration in +output_userspace() with nla_for_each_nested(), which ensures that only +well-formed attributes are processed. + +Fixes: ccb1352e76cf ("net: Add Open vSwitch kernel components.") +Signed-off-by: Eelco Chaudron +Acked-by: Ilya Maximets +Acked-by: Aaron Conole +Link: https://patch.msgid.link/0bd65949df61591d9171c0dc13e42cea8941da10.1746541734.git.echaudro@redhat.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/openvswitch/actions.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/openvswitch/actions.c ++++ b/net/openvswitch/actions.c +@@ -975,8 +975,7 @@ static int output_userspace(struct datap + upcall.cmd = OVS_PACKET_CMD_ACTION; + upcall.mru = OVS_CB(skb)->mru; + +- for (a = nla_data(attr), rem = nla_len(attr); rem > 0; +- a = nla_next(a, &rem)) { ++ nla_for_each_nested(a, attr, rem) { + switch (nla_type(a)) { + case OVS_USERSPACE_ATTR_USERDATA: + upcall.userdata = a; diff --git a/queue-6.12/series b/queue-6.12/series index dfb8b17172..800d174c4c 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -13,3 +13,4 @@ can-rockchip_canfd-rkcanfd_remove-fix-order-of-unregistration-calls.patch ksmbd-prevent-rename-with-empty-string.patch ksmbd-prevent-out-of-bounds-stream-writes-by-validating-pos.patch ksmbd-fix-uaf-in-__close_file_table_ids.patch +openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch