]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: mvm: fix an off-by-1 boundary check
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 14 Jul 2026 11:19:51 +0000 (14:19 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 14 Jul 2026 17:45:19 +0000 (20:45 +0300)
Before looking at the 11th byte, check the length is big enough.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260714141909.d22bf52a18d0.If0ef6612a67cca671428b06dbdeec68549e50ae6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

index 74bd4038fd5601458dda710c669adea67db0b3a1..48cc10db7b967832981f76f713a90bc71c63d0da 100644 (file)
@@ -3490,7 +3490,7 @@ static void iwl_mvm_check_he_obss_narrow_bw_ru_iter(struct wiphy *wiphy,
        elem = cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, ies->data,
                                  ies->len);
 
-       if (!elem || elem->datalen < 10 ||
+       if (!elem || elem->datalen < 11 ||
            !(elem->data[10] &
              WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT)) {
                data->tolerated = false;