mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
FT: Fix potential NULL pointer dereference in MDE addition
The bss variable in this function might be NULL, so make the FT MDE
addition case conditional on a BSS entry being available.
Fixes: 3dc3afe298
("FT: Add MDE to assoc request IEs in connect params")
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
661afb2edd
commit
88bf44be42
@ -2748,7 +2748,7 @@ static u8 * wpas_populate_assoc_ies(
|
||||
* Add MDIE under these conditions: the network profile allows FT,
|
||||
* the AP supports FT, and the mobility domain ID matches.
|
||||
*/
|
||||
if (wpa_key_mgmt_ft(wpa_sm_get_key_mgmt(wpa_s->wpa))) {
|
||||
if (bss && wpa_key_mgmt_ft(wpa_sm_get_key_mgmt(wpa_s->wpa))) {
|
||||
const u8 *mdie = wpa_bss_get_ie(bss, WLAN_EID_MOBILITY_DOMAIN);
|
||||
|
||||
if (mdie && mdie[1] >= MOBILITY_DOMAIN_ID_LEN) {
|
||||
|
Loading…
Reference in New Issue
Block a user