Eric Dumazet f87fda00b6 bonding: prevent out of bound accesses
ether_addr_equal_64bits() requires some care about its arguments,
namely that 8 bytes might be read, even if last 2 byte values are not
used.

KASan detected a violation with null_mac_addr and lacpdu_mcast_addr
in bond_3ad.c

Same problem with mac_bcast[] and mac_v6_allmcast[] in bond_alb.c :
Although the 8-byte alignment was there, KASan would detect out
of bound accesses.

Fixes: 815117adaf5b ("bonding: use ether_addr_equal_unaligned for bond addr compare")
Fixes: bb54e58929f3 ("bonding: Verify RX LACPDU has proper dest mac-addr")
Fixes: 885a136c52a8 ("bonding: use compare_ether_addr_64bits() in ALB")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-01 06:06:09 -04:00
..
2016-04-13 10:41:10 +02:00
2016-05-20 11:23:49 -07:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2015-11-18 16:17:38 -05:00
2016-04-25 16:44:27 -04:00
2016-04-25 16:44:27 -04:00
2016-04-25 16:44:27 -04:00
2016-06-09 23:41:03 -07:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2016-05-11 19:36:28 -04:00
2016-02-16 20:21:48 -05:00
2016-05-20 18:03:16 -04:00
2016-04-28 17:03:38 -04:00
2016-04-25 16:45:53 -04:00
2016-06-15 22:15:21 -07:00
2016-04-27 22:48:25 -04:00
2016-05-20 18:03:17 -04:00
2016-05-03 16:08:14 -04:00
2016-03-10 14:42:03 -05:00
2016-05-11 19:31:40 -04:00
2016-02-21 22:00:28 -05:00
2015-10-23 06:26:42 -07:00
2016-05-16 13:46:23 -04:00
2016-03-23 22:09:58 -04:00
2016-04-07 16:53:30 -04:00
2015-03-12 22:58:12 -04:00
2016-05-11 19:31:40 -04:00
2016-05-03 16:08:14 -04:00
2015-10-26 22:24:22 -07:00
2016-04-27 22:48:25 -04:00
2016-04-27 22:48:23 -04:00