ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route
authorDavid Ahern <dsahern@kernel.org>
Fri, 31 Dec 2021 00:36:34 +0000 (17:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 14:35:14 +0000 (15:35 +0100)
commitca0097c543fc65c29c55f1a98b40e9785079737b
treeb94fdf2c1862909802f7e6bc517df4d7eae4b321
parent00e8b9f313b2622a4e98e893cf30c27fa201c5e7
ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route

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@kernel.org>
Cc: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/route.c