]> git.ipfire.org Git - thirdparty/hostap.git/commit
SAE: Fix potential infinite loop in mismatching PMK case on AP
authorJouni Malinen <jouni@codeaurora.org>
Fri, 2 Mar 2018 10:13:16 +0000 (12:13 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 2 Mar 2018 19:27:18 +0000 (21:27 +0200)
commitf5e0a3324bf3fbf3bfab36fab09ab0adf87ede59
tree5c0bf35e90f7141b01962dd82f436c5b349d445d
parent427729ee67fa53ff38cf7ac7023d112ecc90950e
SAE: Fix potential infinite loop in mismatching PMK case on AP

Commit e61fea6b467bec0702096c795b06195584d32a6c ('SAE: Fix PMKSA caching
behavior in AP mode') modified the PSK fetching loop to not override PMK
in case of SAE with PMKSA caching. However, that commit missed the error
path cases where there is need to break from the loop with exact
negative of the check in the beginning of the loop. This could result in
hitting an infinite loop in hostapd if a station derived a different PMK
value from otherwise successfully completed SAE authentication or if a
STA used a different PMK with a PMKSA caching attempt after a previously
completed successful authentication.

Fix this by adding the matching break condition on SAE AKM within the
loops.

Fixes: e61fea6b467b ("SAE: Fix PMKSA caching behavior in AP mode")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/wpa_auth.c