The TX status handler for DPP Authentication Confirm message might have
resulted in use-after-free if the start of a GAS query were to fail,
e.g., due to being somehow unable to transmit the initial request. Avoid
this by explicitly confirming that the authentication session was not
removed.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
return;
}
- if (hapd->dpp_auth_ok_on_ack)
+ if (hapd->dpp_auth_ok_on_ack) {
hostapd_dpp_auth_success(hapd, 1);
+ if (!hapd->dpp_auth) {
+ /* The authentication session could have been removed in
+ * some error cases, e.g., when starting GAS client and
+ * failing to send the initial request. */
+ return;
+ }
+ }
if (!is_broadcast_ether_addr(dst) && !ok) {
wpa_printf(MSG_DEBUG,