wpa_supplicant: Fix invalid memory dereference

This commit is contained in:
Kapil Gupta
2022-01-18 12:49:25 +05:30
committed by bot
parent 9bc2dd0b53
commit 9b38b15180
3 changed files with 66 additions and 30 deletions

View File

@@ -1042,10 +1042,9 @@ continue_req:
}
static struct wpabuf *
eap_peap_process(struct eap_sm *sm, void *priv,
struct eap_method_ret *ret,
const struct wpabuf *reqData)
static struct wpabuf * eap_peap_process(struct eap_sm *sm, void *priv,
struct eap_method_ret *ret,
const struct wpabuf *reqData)
{
const struct eap_hdr *req;
size_t left;
@@ -1096,6 +1095,14 @@ eap_peap_process(struct eap_sm *sm, void *priv,
data->peap_version, id, pos,
left, &resp);
if (res < 0) {
wpa_printf(MSG_DEBUG,
"EAP-PEAP: TLS processing failed");
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
return resp;
}
if (tls_connection_established(sm->ssl_ctx, data->ssl.conn)) {
char label[24];
wpa_printf(MSG_DEBUG, "EAP-PEAP: TLS done, proceed to Phase 2");