Răsfoiți Sursa

qcacmn: Add ML IE handling in util_scan_copy_beacon_data

Currently, ML IE address update is missing while copying the beacon data.
This may result in illegal memory access when ML IE accessed from copyied
scan entry after original scan entry got freed.

To avoid this, update ML IE address in new scan entry while copying
scan entry.

Change-Id: I6161481cbd13573b8177f122f7d26d177cc07aaa
CRs-Fixed: 3052302
Bapiraju Alla 3 ani în urmă
părinte
comite
8354390c7d

+ 5 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -250,6 +250,11 @@ struct ie_list {
 #ifdef WLAN_FEATURE_11BE_MLO
 	uint8_t *multi_link;
 #endif
+
+/**
+ * For any new IEs in this structre, add handling in
+ * util_scan_copy_beacon_data API.
+ */
 };
 
 enum scan_entry_connection_state {

+ 3 - 0
umac/scan/dispatcher/inc/wlan_scan_utils_api.h

@@ -738,6 +738,9 @@ util_scan_copy_beacon_data(struct scan_cache_entry *new_entry,
 	ie_lst->ehtcap = conv_ptr(ie_lst->ehtcap, old_ptr, new_ptr);
 	ie_lst->ehtop = conv_ptr(ie_lst->ehtop, old_ptr, new_ptr);
 #endif
+#ifdef WLAN_FEATURE_11BE_MLO
+	ie_lst->multi_link = conv_ptr(ie_lst->multi_link, old_ptr, new_ptr);
+#endif
 
 	return QDF_STATUS_SUCCESS;
 }