This is a note to let you know that I've just added the patch titled ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ipv6-check-attribute-length-for-rta_gateway-when-deleting-multipath-route.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1ff15a710a862db1101b97810af14aedc835a86a Mon Sep 17 00:00:00 2001 From: David Ahern <dsahern@xxxxxxxxxx> Date: Thu, 30 Dec 2021 17:36:34 -0700 Subject: ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route From: David Ahern <dsahern@xxxxxxxxxx> commit 1ff15a710a862db1101b97810af14aedc835a86a upstream. Make sure RTA_GATEWAY for IPv6 multipath route has enough bytes to hold an IPv6 address. Fixes: 6b9ea5a64ed5 ("ipv6: fix multipath route replace error recovery") Signed-off-by: David Ahern <dsahern@xxxxxxxxxx> Cc: Roopa Prabhu <roopa@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/ipv6/route.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5453,7 +5453,11 @@ static int ip6_route_multipath_del(struc nla = nla_find(attrs, attrlen, RTA_GATEWAY); if (nla) { - nla_memcpy(&r_cfg.fc_gateway, nla, 16); + err = fib6_gw_from_attr(&r_cfg.fc_gateway, nla, + extack); + if (err) + return err; + r_cfg.fc_flags |= RTF_GATEWAY; } } Patches currently in stable-queue which might be from dsahern@xxxxxxxxxx are queue-5.15/ipv4-check-attribute-length-for-rta_flow-in-multipath-route.patch queue-5.15/ipv6-check-attribute-length-for-rta_gateway-when-deleting-multipath-route.patch queue-5.15/ipv6-check-attribute-length-for-rta_gateway-in-multipath-route.patch queue-5.15/lwtunnel-validate-rta_encap_type-attribute-length.patch queue-5.15/ipv4-check-attribute-length-for-rta_gateway-in-multipath-route.patch