android_kernel_oneplus_msm8998/drivers/net/ethernet/broadcom
Venkat Duvvuru 8e943a8530 bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine.
[ Upstream commit 78f300049335ae81a5cc6b4b232481dc5e1f9d41 ]

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:19:44 +01:00
..
bnx2x bnx2x: Improve reliability in case of nested PCI errors 2018-03-03 10:19:43 +01:00
bnxt bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. 2018-03-03 10:19:44 +01:00
genet net: bcmgenet: Power up the internal PHY before probing the MII 2017-12-20 10:04:53 +01:00
b44.c b44: call netif_napi_del() 2015-06-07 19:45:34 -07:00
b44.h b44: Utilize BRCM_PSEUDO_PHY_ADDR 2015-06-10 23:33:58 -07:00
bcm63xx_enet.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
bcm63xx_enet.h
bcmsysport.c net: systemport: Pad packet before inserting TSB 2017-12-09 18:42:41 +01:00
bcmsysport.h net: systemport: Pre-calculate and utilize cb->bd_addr 2015-05-30 23:51:09 -07:00
bgmac.c bgmac: reset & enable Ethernet core before using it 2017-07-15 11:57:44 +02:00
bgmac.h bgmac: Utilize BRCM_PSEUDO_PHY_ADDR 2015-06-10 23:33:58 -07:00
bnx2.c BNX2: free temp_stats_blk on error path 2015-10-12 19:33:46 -07:00
bnx2.h BNX2: fix a Null Pointer for stats_blk 2015-10-11 05:06:21 -07:00
bnx2_fw.h
cnic.c cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
cnic.h
cnic_defs.h
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
Kconfig bnxt_en: add VXLAN dependency 2015-11-05 00:00:25 -05:00
Makefile bnxt_en: New Broadcom ethernet driver. 2015-10-22 19:30:33 -07:00
sb1250-mac.c MIPS: SB1: Remove support for Pass 1 parts. 2015-07-14 21:47:34 +02:00
tg3.c tg3: Enable PHY reset in MTU change path for 5720 2018-03-03 10:19:43 +01:00
tg3.h tg3: Add workaround to restrict 5762 MRRS to 2048 2018-03-03 10:19:42 +01:00