Skip to content

Commit 8363d06

Browse files
committed
wifi: iwlwifi: mvm: guard against invalid STA ID on removal
jira LE-1907 cve CVE-2024-36921 Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4 commit-author Benjamin Berg <benjamin.berg@intel.com> commit 17f6451 Guard against invalid station IDs in iwl_mvm_mld_rm_sta_id as that would result in out-of-bounds array accesses. This prevents issues should the driver get into a bad state during error handling. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320232419.d523167bda9c.I1cffd86363805bf86a95d8bdfd4b438bb54baddc@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> (cherry picked from commit 17f6451) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 36b5259 commit 8363d06

File tree

1 file changed

+6
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+6
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,15 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
855855

856856
int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id)
857857
{
858-
int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
858+
int ret;
859859

860860
lockdep_assert_held(&mvm->mutex);
861861

862+
if (WARN_ON(sta_id == IWL_MVM_INVALID_STA))
863+
return 0;
864+
865+
ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
866+
862867
RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL);
863868
RCU_INIT_POINTER(mvm->fw_id_to_link_sta[sta_id], NULL);
864869
return ret;

0 commit comments

Comments
 (0)