WPS: Fix STA state validation when processing PutWLANResponse
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 19 Feb 2014 21:51:55 +0000 (23:51 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 19 Feb 2014 21:51:55 +0000 (23:51 +0200)
commitd87a6acdf5aedec3fe6e1f19ce3c84f1741c2bf7
treeb623f8bd27abe5b919495e04d69d0ec6c5afd561
parentac494fcce4270dbd076ab1d167dbffd6e0f7060b
WPS: Fix STA state validation when processing PutWLANResponse

It is possible for an ER to send an unexpected PutWLANResponse action
when the destination STA is in disassociated, but not fully
deauthenticated state. sta->eapol_sm can be NULL in such state and as
such, it would be possible to hit a NULL pointer dereference in the
eapol_auth_eap_pending_cb() call at the end of the
hostapd_wps_probe_req_rx() when trying to proxy the WPS message to the
station. Fix this by validating that sta->eapol_sm is set before
processing the message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/wps_hostapd.c