hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/ipv4/metrics.c
....@@ -1,5 +1,6 @@
11 // SPDX-License-Identifier: GPL-2.0-only
22 #include <linux/netlink.h>
3
+#include <linux/nospec.h>
34 #include <linux/rtnetlink.h>
45 #include <linux/types.h>
56 #include <net/ip.h>
....@@ -28,6 +29,7 @@
2829 return -EINVAL;
2930 }
3031
32
+ type = array_index_nospec(type, RTAX_MAX + 1);
3133 if (type == RTAX_CC_ALGO) {
3234 char tmp[TCP_CA_NAME_MAX];
3335