linux-brain/drivers/net/ethernet/broadcom
Venkat Duvvuru 0fd874142d bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine.
[ Upstream commit 78f3000493 ]

In bnxt_vf_ndo_prep (which is called by bnxt_get_vf_config ndo), there is a
check for "Invalid VF id". Currently, the check is done against max_vfs.
However, the user doesn't always create max_vfs. So, the check should be
against the created number of VFs. The number of bnxt_vf_info structures
that are allocated in bnxt_alloc_vf_resources routine is the "number of
requested VFs". So, if an "invalid VF id" falls between the requested
number of VFs and the max_vfs, the driver will be dereferencing an invalid
pointer.

Fixes: c0c050c58d ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Venkat Devvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:23:27 +01:00
..
bnx2x bnx2x: Improve reliability in case of nested PCI errors 2018-03-03 10:23:24 +01:00
bnxt bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. 2018-03-03 10:23:27 +01:00
genet net: bcmgenet: Power up the internal PHY before probing the MII 2017-12-20 10:07:19 +01:00
Kconfig net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
Makefile net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
b44.c net: ethernet: broadcom: b44: use new api ethtool_{get|set}_link_ksettings 2016-09-19 21:39:12 -04:00
b44.h net: ethernet: broadcom: b44: use phydev from struct net_device 2016-09-19 21:39:11 -04:00
bcm63xx_enet.c bcm63xx_enet: avoid uninitialized variable warning 2017-03-18 19:14:29 +08:00
bcm63xx_enet.h net: ethernet: broadcom: bcm63xx: use phydev from struct net_device 2016-09-19 21:39:12 -04:00
bcmsysport.c net: systemport: Pad packet before inserting TSB 2017-12-09 22:01:50 +01:00
bcmsysport.h net: ethernet: bcmsysport: use phydev from struct net_device 2016-06-19 16:15:55 -07:00
bgmac-bcma-mdio.c net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
bgmac-bcma.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-30 00:54:02 -04:00
bgmac-platform.c net: ethernet: bgmac: Remove redundant dev_err call in bgmac_probe() 2016-07-13 18:07:56 -07:00
bgmac.c net: bgmac: fix reversed checks for clock control flag 2016-11-09 13:32:06 -05:00
bgmac.h net: bgmac: support Ethernet core on BCM53573 SoCs 2016-08-18 23:36:07 -07:00
bnx2.c bnx2: Wait for in-flight DMA to complete at probe stage 2016-11-14 16:20:53 -05:00
bnx2.h BNX2: fix a Null Pointer for stats_blk 2015-10-11 05:06:21 -07:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
cnic.c cnic: call cp->stop_hw() in cnic_start_hw() on allocation failure 2016-05-06 15:44:54 -04:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
sb1250-mac.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
tg3.c tg3: Enable PHY reset in MTU change path for 5720 2018-03-03 10:23:24 +01:00
tg3.h tg3: Add workaround to restrict 5762 MRRS to 2048 2018-03-03 10:23:24 +01:00