mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
WPS ER: Fix segfault in some selected registrar change cases
Commit 628d54639a90f779fd5c98c31e049638de56b17e introduced number of new WPS related ctrl_iface messages to hostapd. Some of these were for ER events which do not make any sense to hostapd that cannot operate as an ER. The WPS_EV_ER_SET_SELECTED_REGISTRAR one from wps_registrar_sel_registrar_changed_event() was especially problematic since it can cause wpa_supplicant ER code segfault due to missing event data. Revert all the ER specific changes from commit 628d54639a90f779fd5c98c31e049638de56b17e to get rid of the segfault and undesired extra code in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
79b8c60f81
commit
d6d731b848
@ -599,22 +599,16 @@ static void hostapd_wps_event_cb(void *ctx, enum wps_event event,
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_TIMEOUT);
|
||||
break;
|
||||
case WPS_EV_ER_AP_ADD:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_ADD);
|
||||
break;
|
||||
case WPS_EV_ER_AP_REMOVE:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_REMOVE);
|
||||
break;
|
||||
case WPS_EV_ER_ENROLLEE_ADD:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_ADD);
|
||||
break;
|
||||
case WPS_EV_ER_ENROLLEE_REMOVE:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_REMOVE);
|
||||
break;
|
||||
case WPS_EV_ER_AP_SETTINGS:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_SETTINGS);
|
||||
break;
|
||||
case WPS_EV_ER_SET_SELECTED_REGISTRAR:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_SET_SEL_REG);
|
||||
break;
|
||||
}
|
||||
if (hapd->wps_event_cb)
|
||||
|
@ -312,15 +312,6 @@ void wps_pbc_timeout_event(struct wps_context *wps)
|
||||
}
|
||||
|
||||
|
||||
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps)
|
||||
{
|
||||
if (wps->event_cb == NULL)
|
||||
return;
|
||||
|
||||
wps->event_cb(wps->cb_ctx, WPS_EV_ER_SET_SELECTED_REGISTRAR, NULL);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_WPS_OOB
|
||||
|
||||
static struct wpabuf * wps_get_oob_cred(struct wps_context *wps)
|
||||
|
@ -228,7 +228,6 @@ void wps_success_event(struct wps_context *wps);
|
||||
void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part);
|
||||
void wps_pbc_overlap_event(struct wps_context *wps);
|
||||
void wps_pbc_timeout_event(struct wps_context *wps);
|
||||
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps);
|
||||
|
||||
extern struct oob_device_data oob_ufd_device_data;
|
||||
extern struct oob_device_data oob_nfc_device_data;
|
||||
|
@ -3137,7 +3137,6 @@ static void wps_registrar_set_selected_timeout(void *eloop_ctx,
|
||||
"unselect internal Registrar");
|
||||
reg->selected_registrar = 0;
|
||||
reg->pbc = 0;
|
||||
wps_registrar_sel_registrar_changed_event(reg->wps);
|
||||
wps_registrar_selected_registrar_changed(reg);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user