iwlwifi: pnvm: read EFI data only if long enough
authorJohannes Berg <johannes.berg@intel.com>
Sat, 16 Oct 2021 08:43:58 +0000 (11:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:38 +0000 (19:16 +0100)
commit493a9e6367a1ca1c0ddd5d8b35a5089d6908e803
tree37b3c0bb9b4b27a7d5b72ec45343adbf3391211e
parentb0b49d055533682b8efd93a673b24f1a6fb69588
iwlwifi: pnvm: read EFI data only if long enough

[ Upstream commit e864a77f51d0d8113b49cf7d030bc9dc911c8176 ]

If the data we get from EFI is not even long enough for
the package struct we expect then ignore it entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: a1a6a4cf49ec ("iwlwifi: pnvm: implement reading PNVM from UEFI")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20211016114029.33feba783518.I54a5cf33975d0330792b3d208b225d479e168f32@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/fw/pnvm.c