aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-01-22 21:12:51 +0200
committerJouni Malinen <j@w1.fi>2012-01-22 21:54:24 +0200
commit4646ee67c0658cb0025be3f4fab2e9d92b059b50 (patch)
tree43e69b378df6ab146c321ac1028fa38ba69ef1b6 /src/eap_peer
parentbeec9c3a1ffc0149fa8f76b9d526abc9cdc5efb7 (diff)
downloadexternal_wpa_supplicant_8_ti-4646ee67c0658cb0025be3f4fab2e9d92b059b50.zip
external_wpa_supplicant_8_ti-4646ee67c0658cb0025be3f4fab2e9d92b059b50.tar.gz
external_wpa_supplicant_8_ti-4646ee67c0658cb0025be3f4fab2e9d92b059b50.tar.bz2
Reject too short IMSI in EAP-SIM/AKA identity generation
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index 91fa4a9..cac85db 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -895,6 +895,11 @@ static int eap_sm_imsi_identity(struct eap_sm *sm,
wpa_hexdump_ascii(MSG_DEBUG, "IMSI", (u8 *) imsi, imsi_len);
+ if (imsi_len < 7) {
+ wpa_printf(MSG_WARNING, "Too short IMSI for SIM identity");
+ return -1;
+ }
+
for (i = 0; m && (m[i].vendor != EAP_VENDOR_IETF ||
m[i].method != EAP_TYPE_NONE); i++) {
if (m[i].vendor == EAP_VENDOR_IETF &&