]> git.ipfire.org Git - thirdparty/hostap.git/commit
AP: Fix infinite loop in WPA state machine when out of random bytes
authorMichael Braun <michael-dev@fami-braun.de>
Sat, 30 Mar 2013 17:53:22 +0000 (19:53 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 30 Mar 2013 17:53:22 +0000 (19:53 +0200)
commit65a32cdbcb42f09521622d409dfcb04a888432d0
treeba578be717ef01f6f2f626f9617f38a05980c008
parenta5f61b2b87ceffec517e3baf531a466940dbd0b7
AP: Fix infinite loop in WPA state machine when out of random bytes

When the OS is out of random bytes in SM_STATE(WPA_PTK, AUTHENTICATION2)
in ap/wpa_auth.c, hostapd sends the sm to state DISCONNECT without
clearing ReAuthenticationRequest, resulting in an infinite loop.
Clearing sm->ReAuthenticationRequest using gdb fixes the running hostapd
instance for me. Also sm->Disconnect = TRUE should be used instead of
wpa_sta_disconnect() to make sure that the incomplete ANonce does not
get used.

Fix this issue by resetting sm->ReAuthenticationRequest even if the STA
gets disconnected and use sm->Disconnect instead of
wpa_sta_disconnect().

Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
src/ap/wpa_auth.c