Browse Source

qcacmn: Drop beacon or probe rsp with invalid RSN IE

Check RSN ie valid or not for beacon or probe response frames
in scanning. The invalid RSN ie will cause the AP filtered out
during candidate selection in connecting.

Change-Id: Id324ddfaa0f438482673e66b683dcf903d9fc0e3
CRs-Fixed: 3218707
Liangwei Dong 3 years ago
parent
commit
0b43b9f1f8
1 changed files with 16 additions and 0 deletions
  1. 16 0
      umac/scan/core/src/wlan_scan_cache_db.c

+ 16 - 0
umac/scan/core/src/wlan_scan_cache_db.c

@@ -1127,6 +1127,22 @@ QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn)
 			qdf_mem_free(scan_node);
 			continue;
 		}
+		if (util_scan_entry_rsn(scan_entry)) {
+			status = wlan_crypto_rsnie_check(
+					&sec_params,
+					util_scan_entry_rsn(scan_entry));
+			if (QDF_IS_STATUS_ERROR(status)) {
+				scm_nofl_debug("Drop frame from invalid RSN IE AP"
+					       QDF_MAC_ADDR_FMT
+					       ": RSN IE parse failed, status %d",
+					       QDF_MAC_ADDR_REF(
+					       scan_entry->bssid.bytes),
+					       status);
+				util_scan_free_cache_entry(scan_entry);
+				qdf_mem_free(scan_node);
+				continue;
+			}
+		}
 		if (wlan_cm_get_check_6ghz_security(psoc) &&
 		    wlan_reg_is_6ghz_chan_freq(scan_entry->channel.chan_freq)) {
 			if (!util_scan_entry_rsn(scan_entry)) {