From f3c6b230ddb9703d61af8d8424a9c4288dd24200 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 21 Jun 2014 12:18:56 +0300 Subject: [PATCH] EAP-SIM': Fix AT_KDF parser to avoid infinite loop Hitting maximum number of AT_KDF attributes could result in an infinite loop due to the attribute parser not incrementing the current position properly when skipping the extra KDF. Signed-off-by: Jouni Malinen --- src/eap_common/eap_sim_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eap_common/eap_sim_common.c b/src/eap_common/eap_sim_common.c index e1773bf1a..ae0218589 100644 --- a/src/eap_common/eap_sim_common.c +++ b/src/eap_common/eap_sim_common.c @@ -893,7 +893,7 @@ int eap_sim_parse_attr(const u8 *start, const u8 *end, if (attr->kdf_count == EAP_AKA_PRIME_KDF_MAX) { wpa_printf(MSG_DEBUG, "EAP-AKA': Too many " "AT_KDF attributes - ignore this"); - continue; + break; } attr->kdf[attr->kdf_count] = WPA_GET_BE16(apos); attr->kdf_count++;