mirror-linux/drivers/net/ethernet/broadcom
Maxim Korotkov efb1a25751 bnxt: avoid overflow in bnxt_get_nvram_directory()
[ Upstream commit 7c6dddc239 ]

The value of an arithmetic expression is subject
of possible overflow due to a failure to cast operands to a larger data
type before performing arithmetic. Used macro for multiplication instead
operator for avoiding overflow.

Found by Security Code and Linux Verification
Center (linuxtesting.org) with SVACE.

Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20230309174347.3515-1-korotkov.maxim.s@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:37 +01:00
..
bnx2x
bnxt bnxt: avoid overflow in bnxt_get_nvram_directory() 2023-05-24 17:32:37 +01:00
genet net: bcmgenet: Add a check for oversized packets 2023-03-10 09:33:51 +01:00
Kconfig
Makefile
b44.c
b44.h
bcm63xx_enet.c
bcm63xx_enet.h
bcm4908_enet.c
bcm4908_enet.h
bcmsysport.c
bcmsysport.h
bgmac-bcma-mdio.c
bgmac-bcma.c net: bgmac: fix BCM5358 support by setting correct flags 2023-02-22 12:59:51 +01:00
bgmac-platform.c
bgmac.c bgmac: fix *initial* chip reset to support BCM5358 2023-03-17 08:50:22 +01:00
bgmac.h bgmac: fix *initial* chip reset to support BCM5358 2023-03-17 08:50:22 +01:00
bnx2.c bnx2: Use kmalloc_size_roundup() to match ksize() usage 2022-12-31 13:32:59 +01:00
bnx2.h
bnx2_fw.h
cnic.c
cnic.h
cnic_defs.h
cnic_if.h
sb1250-mac.c
tg3.c net/tg3: resolve deadlock in tg3_reset_task() during EEH 2023-02-01 08:34:48 +01:00
tg3.h
unimac.h