kernel/net/ipv4/metrics.c
.. .. @@ -1,5 +1,6 @@ 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 #include <linux/netlink.h> 3 +#include <linux/nospec.h>3 4 #include <linux/rtnetlink.h> 4 5 #include <linux/types.h> 5 6 #include <net/ip.h> .. .. @@ -28,6 +29,7 @@ 28 29 return -EINVAL; 29 30 } 30 31 32 + type = array_index_nospec(type, RTAX_MAX + 1);31 33 if (type == RTAX_CC_ALGO) { 32 34 char tmp[TCP_CA_NAME_MAX]; 33 35