]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:17:41 +0000 (07:17 +0100)
commitf653b94e30b600a355417f01915d48da1a020bc8
treeee854ee0b19feff7aa9ed7390fd79db22bd01af5
parent186e1f6db71876857d9883eed9af389e4482f3e8
net: systemport: fix index check to avoid an array out of bounds access

[ Upstream commit 018df4cac217ae3ad0607681b84921310556a7c1 ]

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: 2302389b8f27 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bcmsysport.c