wifi: iwlwifi: mvm: fix size check for fw_link_id
authorGregory Greenman <gregory.greenman@intel.com>
Tue, 17 Oct 2023 09:16:44 +0000 (12:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:38 +0000 (17:19 +0000)
commitd09d246f6abdb151d19f8ff73121f9b13c518770
treeb11e1b8323ad6a9701a711422ae934d88da94626
parentaa4dd55adeb6db7939aa2ad218c39a91a8913737
wifi: iwlwifi: mvm: fix size check for fw_link_id

[ Upstream commit e25bd1853cc8308158d97e5b3696ea3689fa0840 ]

Check that fw_link_id does not exceed the size of link_id_to_link_conf
array. There's no any codepath that can cause that, but it's still
safer to verify in case fw_link_id gets corrupted.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231017115047.3385bd11f423.I2d30fdb464f951c648217553c47901857a0046c7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/link.c