]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: iwlwifi: add a few rate index validity checks
authorAnjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Wed, 14 Jun 2023 09:41:37 +0000 (12:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2025 17:24:01 +0000 (18:24 +0100)
commit091a023cf2ae5124b63a3c8b49d53afbb04cf4d0
tree1257a8793d83fc6c6af43c75c3a21a3be56bb393
parent81d4dd05c412ba04f9f6b85b718e6da833be290c
wifi: iwlwifi: add a few rate index validity checks

commit efbe8f81952fe469d38655744627d860879dcde8 upstream.

Validate index before access iwl_rate_mcs to keep rate->index
inside the valid boundaries. Use MCS_0_INDEX if index is less
than MCS_0_INDEX and MCS_9_INDEX if index is greater then
MCS_9_INDEX.

Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230614123447.79f16b3aef32.If1137f894775d6d07b78cbf3a6163ffce6399507@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/dvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.c