AP: Validate management frame length
Make sure that received management frames are long enough before processing them. This avoids a potential segmentation fault if a driver delivers an invalid frame all the way to hostapd.
This commit is contained in:
parent
e4d7b22a53
commit
cbcf92b42f
2 changed files with 5 additions and 0 deletions
|
@ -1460,6 +1460,9 @@ void ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
|||
int broadcast;
|
||||
u16 fc, stype;
|
||||
|
||||
if (len < 24)
|
||||
return;
|
||||
|
||||
mgmt = (struct ieee80211_mgmt *) buf;
|
||||
fc = le_to_host16(mgmt->frame_control);
|
||||
stype = WLAN_FC_GET_STYPE(fc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue