Loading
wifi: iwlwifi: mvm: avoid NULL pointer dereference
mainline inclusion from mainline-v6.12-rc1 commit 557a6cd847645e667f3b362560bd7e7c09aac284 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYRCA CVE: CVE-2024-49929 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=557a6cd847645e667f3b362560bd7e7c09aac284 -------------------------------- iwl_mvm_tx_skb_sta() and iwl_mvm_tx_mpdu() verify that the mvmvsta pointer is not NULL. It retrieves this pointer using iwl_mvm_sta_from_mac80211, which is dereferencing the ieee80211_sta pointer. If sta is NULL, iwl_mvm_sta_from_mac80211 will dereference a NULL pointer. Fix this by checking the sta pointer before retrieving the mvmsta from it. If sta is not NULL, then mvmsta isn't either. Signed-off-by:Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by:
Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20240825191257.880921ce23b7.I340052d70ab6d3410724ce955eb00da10e08188f@changeid Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/tx.c [commit c8ee33e1("wifi: iwlwifi: mvm: sta preparation for MLO") add struct iwl_mvm_link_sta deflink to mvmsta, which not merged lead to conflicts] Signed-off-by:
Dong Chenchen <dongchenchen2@huawei.com>