Ver Fonte

Merge "qcacmn: Fix potential OOB read in util_scan_parse_mbssid()" into wlan-cmn.driver.lnx.2.0.14

CNSS_WLAN Service há 1 ano atrás
pai
commit
5438cc76c2
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      umac/scan/dispatcher/src/wlan_scan_utils_api.c

+ 9 - 0
umac/scan/dispatcher/src/wlan_scan_utils_api.c

@@ -3424,6 +3424,15 @@ static QDF_STATUS util_scan_parse_mbssid(struct wlan_objmgr_pdev *pdev,
 		if (!mbssid_elem)
 			break;
 
+		/*
+		 * The max_bssid_indicator field is mandatory, therefore the
+		 * length of the MBSSID element should atleast be 1.
+		 */
+		if (!mbssid_elem[TAG_LEN_POS]) {
+			scm_debug_rl("MBSSID IE is of length zero");
+			break;
+		}
+
 		mbssid_info.profile_count =
 			(1 << mbssid_elem[MBSSID_INDICATOR_POS]);