1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/broadcom/asp2
Dan Carpenter 48d17c517a net: bcmasp: Prevent array undereflow in bcmasp_netfilt_get_init()
The "loc" value comes from the user and it can be negative leading to an
an array underflow when we check "priv->net_filters[loc].claimed".  Fix
this by changing the type to u32.

Fixes: c5d511c495 ("net: bcmasp: Add support for wake on net filters")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
Link: https://lore.kernel.org/r/b3b47b25-01fc-4d9f-a6c3-e037ad4d71d7@moroto.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-08 15:06:15 -07:00
..
bcmasp.c net: bcmasp: Prevent array undereflow in bcmasp_netfilt_get_init() 2023-08-08 15:06:15 -07:00
bcmasp.h net: bcmasp: Prevent array undereflow in bcmasp_netfilt_get_init() 2023-08-08 15:06:15 -07:00
bcmasp_ethtool.c net: bcmasp: Add support for ethtool driver stats 2023-07-17 07:39:04 +01:00
bcmasp_intf.c net: bcmasp: Add support for ethtool driver stats 2023-07-17 07:39:04 +01:00
bcmasp_intf_defs.h net: bcmasp: Add support for ethtool standard stats 2023-07-17 07:39:04 +01:00
Makefile net: bcmasp: Add support for ASP2.0 Ethernet controller 2023-07-17 07:39:04 +01:00