team: use a larger struct for mac address
authorWANG Cong <xiyou.wangcong@gmail.com>
Wed, 26 Jul 2017 22:22:07 +0000 (15:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jul 2017 18:25:05 +0000 (11:25 -0700)
commit996f6e12cfb33ff6c3e39b4511bb3b8bc564b342
treef497109f548a6bbf976af1d0cada00b06387cd73
parent0254e0c632bfe4a0cf610e2d90397474144f00d2
team: use a larger struct for mac address

IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len,
but in many places especially bonding, we use struct sockaddr
to copy and set mac addr, this could lead to stack out-of-bounds
access.

Fix it by using a larger address storage like bonding.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/team/team.c