Skip to content

Commit aa8f877

Browse files
Eric Dumazetdavem330
authored andcommitted
ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
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]>
1 parent ddea788 commit aa8f877

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
@@ -3975,6 +3975,7 @@ void rt6_mtu_change(struct net_device *dev, unsigned int mtu)
39753975

39763976
static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
39773977
[RTA_GATEWAY] = { .len = sizeof(struct in6_addr) },
3978+
[RTA_PREFSRC] = { .len = sizeof(struct in6_addr) },
39783979
[RTA_OIF] = { .type = NLA_U32 },
39793980
[RTA_IIF] = { .type = NLA_U32 },
39803981
[RTA_PRIORITY] = { .type = NLA_U32 },
@@ -3986,6 +3987,7 @@ static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
39863987
[RTA_EXPIRES] = { .type = NLA_U32 },
39873988
[RTA_UID] = { .type = NLA_U32 },
39883989
[RTA_MARK] = { .type = NLA_U32 },
3990+
[RTA_TABLE] = { .type = NLA_U32 },
39893991
};
39903992

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

0 commit comments

Comments
 (0)