From: Greg Kroah-Hartman Date: Fri, 9 May 2025 08:58:11 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v5.15.183~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c294a4e88724b4e32847f4608f72936909ad2438;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch --- diff --git a/queue-6.1/openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch b/queue-6.1/openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch new file mode 100644 index 0000000000..1a42384e08 --- /dev/null +++ b/queue-6.1/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 +@@ -954,8 +954,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.1/series b/queue-6.1/series index b0a1472c14..ee9a6eca91 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -3,3 +3,4 @@ arm64-dts-imx8mm-verdin-link-reg_usdhc2_vqmmc-to-usdhc2.patch can-mcan-m_can_class_unregister-fix-order-of-unregistration-calls.patch can-mcp251xfd-mcp251xfd_remove-fix-order-of-unregistration-calls.patch ksmbd-prevent-out-of-bounds-stream-writes-by-validating-pos.patch +openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch