Skip to content

Commit 8d34c67

Browse files
Eric Dumazetgregkh
authored andcommitted
ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
[ Upstream commit aa8f877 ] KMSAN reported use of uninit-value that I tracked to lack of proper size check on RTA_TABLE attribute. I also believe RTA_PREFSRC lacks a similar check. Fixes: 86872cb ("[IPv6] route: FIB6 configuration using struct fib6_config") Fixes: c3968a8 ("ipv6: RTA_PREFSRC support for ipv6 route source address selection") Signed-off-by: Eric Dumazet <[email protected]> Reported-by: syzbot <[email protected]> Acked-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e0286ea commit 8d34c67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv6/route.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,7 @@ void rt6_mtu_change(struct net_device *dev, unsigned int mtu)
29592959

29602960
static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
29612961
[RTA_GATEWAY] = { .len = sizeof(struct in6_addr) },
2962+
[RTA_PREFSRC] = { .len = sizeof(struct in6_addr) },
29622963
[RTA_OIF] = { .type = NLA_U32 },
29632964
[RTA_IIF] = { .type = NLA_U32 },
29642965
[RTA_PRIORITY] = { .type = NLA_U32 },
@@ -2970,6 +2971,7 @@ static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
29702971
[RTA_EXPIRES] = { .type = NLA_U32 },
29712972
[RTA_UID] = { .type = NLA_U32 },
29722973
[RTA_MARK] = { .type = NLA_U32 },
2974+
[RTA_TABLE] = { .type = NLA_U32 },
29732975
};
29742976

29752977
static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,

0 commit comments

Comments
 (0)