]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: don't read beyond unicast address list
authorBert Kenward <bkenward@solarflare.com>
Wed, 12 Jul 2017 16:19:41 +0000 (17:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jul 2017 21:41:06 +0000 (14:41 -0700)
commit770f973e6a9e0b52894f56958d974ac01abb7edb
tree3ff3726244b4b6835bae5852834102fccfc222e3
parent9b2ea24f42fe5d4ad0d1cd249c1f178fc32c3317
sfc: don't read beyond unicast address list

If we have more than 32 unicast MAC addresses assigned to an interface
we will read beyond the end of the address table in the driver when
adding filters. The next 256 entries store multicast addresses, so we
will end up attempting to insert duplicate filters, which is mostly
harmless. If we add more than 288 unicast addresses we will then read
past the multicast address table, which is likely to be more exciting.

Fixes: cf83a2623b31 ("sfc: clean fallbacks between promisc/normal in efx_ef10_filter_sync_rx_mode")
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c