linux/drivers/net/bonding
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: 815117adaf ("bonding: use ether_addr_equal_unaligned for bond addr compare")
Fixes: bb54e58929 ("bonding: Verify RX LACPDU has proper dest mac-addr")
Fixes: 885a136c52 ("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
..
bond_3ad.c bonding: prevent out of bound accesses 2016-07-01 06:06:09 -04:00
bond_alb.c bonding: prevent out of bound accesses 2016-07-01 06:06:09 -04:00
bond_debugfs.c net: Move bonding headers under include/net 2014-11-10 13:27:49 -05:00
bond_main.c bonding: fix bond_get_stats() 2016-03-18 23:14:15 -04:00
bond_netlink.c bonding: add tlb_dynamic_lb netlink support 2015-07-31 15:35:55 -07:00
bond_options.c bonding: 3ad: allow to set ad_actor settings while the bond is up 2016-02-11 04:31:11 -05:00
bond_procfs.c bonding: Display LACP info only to CAP_NET_ADMIN capable user 2015-06-23 03:11:52 -07:00
bond_sysfs.c bonding: make mii_status sysfs node consistent 2016-01-11 17:14:42 -05:00
bond_sysfs_slave.c bonding: export slave's partner_oper_port_state via sysfs and netlink 2015-06-15 16:40:24 -07:00
bonding_priv.h net/bonding: Make DRV macros private 2015-04-26 22:59:53 -04:00
Makefile bonding: add sysfs /slave dir for bond slave devices. 2014-01-17 18:51:58 -08:00