David Ahern 8bda81a4d4 lwtunnel: Validate RTA_ENCAP_TYPE attribute length
lwtunnel_valid_encap_type_attr is used to validate encap attributes
within a multipath route. Add length validation checking to the type.

lwtunnel_valid_encap_type_attr is called converting attributes to
fib{6,}_config struct which means it is used before fib_get_nhs,
ip6_route_multipath_add, and ip6_route_multipath_del - other
locations that use rtnh_ok and then nla_get_u16 on RTA_ENCAP_TYPE
attribute.

Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules")

Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-31 14:31:59 +00:00
..
2021-06-30 15:51:09 -07:00
2021-11-15 14:22:12 +00:00
2021-06-07 14:08:30 -07:00
2021-08-31 12:03:33 +01:00
2021-05-17 15:29:35 -07:00
2021-10-13 09:41:37 -07:00
2021-10-13 09:41:37 -07:00
2021-10-13 09:41:37 -07:00
2021-06-30 15:51:09 -07:00
2021-10-13 09:41:37 -07:00
2021-07-07 20:52:25 -07:00
2021-05-17 15:29:35 -07:00
2020-03-16 18:26:54 -07:00
2021-03-28 17:31:13 -07:00
2020-12-14 16:40:27 -08:00
2021-05-17 15:29:35 -07:00
2021-08-31 12:03:33 +01:00
2021-05-17 15:29:35 -07:00