[wpa_supplicant] Fix out of bounds read at hostapd/src/common/ieee802_11_common.c:622
Fix out of bounds read in in get_hdr_bssid at
external/wpa_supplicant_8/hostapd/src/common/ieee802_11_common.c:622
Bug: 122465453
Test: Toggle Soft AP on/off
Test: Associate to Soft AP with a STA and run traffic
Change-Id: I00e6844677fa704c30c202798d0a4bb5d614260a
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index e1ef277..4fd3357 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -633,6 +633,8 @@
return NULL;
return hdr->addr1;
case WLAN_FC_TYPE_MGMT:
+ if (len < 24)
+ return NULL;
return hdr->addr3;
default:
return NULL;