aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-06-21 09:18:56 (GMT)
committerJouni Malinen <j@w1.fi>2014-06-21 09:20:52 (GMT)
commitf3c6b230ddb9703d61af8d8424a9c4288dd24200 (patch)
treefc81fc331e7979f2c1bb1adfe18947d59951ab20 /src/eap_common
parentd8e02214eac931cac4f47f1a637ebe1dae95c190 (diff)
downloadhostap-f3c6b230ddb9703d61af8d8424a9c4288dd24200.zip
hostap-f3c6b230ddb9703d61af8d8424a9c4288dd24200.tar.gz
hostap-f3c6b230ddb9703d61af8d8424a9c4288dd24200.tar.bz2
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 <j@w1.fi>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_sim_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_common/eap_sim_common.c b/src/eap_common/eap_sim_common.c
index e1773bf..ae02185 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++;