]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i40e: fix potential NULL pointer dereferencing of pf->vf i40e_sync_vsi_filters()
authorAndrii Staikov <andrii.staikov@intel.com>
Tue, 22 Aug 2023 22:16:53 +0000 (15:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 12:52:33 +0000 (14:52 +0200)
commit711ffb6fa5a0a69a5c007e7b683c8aaa9b1cb6de
tree8e2ab8d3cbb99e6fcf383e137a4f8722b477d232
parent7ac409385e1ca746b1191415a1e5afa8b5f9b0fc
i40e: fix potential NULL pointer dereferencing of pf->vf i40e_sync_vsi_filters()

[ Upstream commit 9525a3c38accd2e186f52443e35e633e296cc7f5 ]

Add check for pf->vf not being NULL before dereferencing
pf->vf[vsi->vf_id] in updating VSI filter sync.
Add a similar check before dereferencing !pf->vf[vsi->vf_id].trusted
in the condition for clearing promisc mode bit.

Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning")
Signed-off-by: Andrii Staikov <andrii.staikov@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_main.c