aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-21 22:03:44 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-21 22:10:22 (GMT)
commit13cb0a66d5ac4d4cda6cd565781a440229e642f0 (patch)
tree02a08a9460d7c45f3138e00fa5fa0e97ecef8e63 /src/eap_common
parent3b6f3b37b8b9798c811acb77d35b335965684061 (diff)
downloadhostap-13cb0a66d5ac4d4cda6cd565781a440229e642f0.zip
hostap-13cb0a66d5ac4d4cda6cd565781a440229e642f0.tar.gz
hostap-13cb0a66d5ac4d4cda6cd565781a440229e642f0.tar.bz2
EAP-EKE: Reject too long Prot() data when building a frame
This error case in own buffer lengths being too short was not handled properly. While this should not really happen since the wpabuf allocation is made large for the fixed cases that are currently supported, better make eap_eke_prot() safer if this functionally ever gets extended with a longer buffer need. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_eke_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eap_common/eap_eke_common.c b/src/eap_common/eap_eke_common.c
index 4dfdb3f..b603e32 100644
--- a/src/eap_common/eap_eke_common.c
+++ b/src/eap_common/eap_eke_common.c
@@ -635,6 +635,7 @@ int eap_eke_prot(struct eap_eke_session *sess,
if (*prot_len < block_size + data_len + pad + icv_len) {
wpa_printf(MSG_INFO, "EAP-EKE: Not enough room for Prot() data");
+ return -1;
}
pos = prot;