]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: fix index check to avoid an array out of bounds access
authorColin Ian King <colin.king@canonical.com>
Thu, 12 Mar 2020 15:04:30 +0000 (15:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 22:50:18 +0000 (15:50 -0700)
commit9792b7fc9bf905e13625d075d7fdfe1bb7d7bd4b
tree035722a01655c9b3e49a464418777ec2a9da7665
parent42b73c468297cc29272c6fb3e1d05024fab4b9f4
net: systemport: fix index check to avoid an array out of bounds access

Currently the bounds check on index is off by one and can lead to
an out of bounds access on array priv->filters_loc when index is
RXCHK_BRCM_TAG_MAX.

Fixes: 18a5e73dbbca ("net: systemport: Add support for WAKE_FILTER")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c