EAP-pwd peer: Fix error path for unexpected Confirm message
If the Confirm message is received from the server before the Identity exchange has been completed, the group has not yet been determined and data->grp is NULL. The error path in eap_pwd_perform_confirm_exchange() did not take this corner case into account and could end up dereferencing a NULL pointer and terminating the process if invalid message sequence is received. (CVE-2015-5316) Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
bef802ece0
commit
95577884ca
1 changed files with 2 additions and 1 deletions
|
@ -774,7 +774,8 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
|
|||
wpabuf_put_data(data->outbuf, conf, SHA256_MAC_LEN);
|
||||
|
||||
fin:
|
||||
bin_clear_free(cruft, BN_num_bytes(data->grp->prime));
|
||||
if (data->grp)
|
||||
bin_clear_free(cruft, BN_num_bytes(data->grp->prime));
|
||||
BN_clear_free(x);
|
||||
BN_clear_free(y);
|
||||
if (data->outbuf == NULL) {
|
||||
|
|
Loading…
Reference in a new issue