aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_aka.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eap_peer/eap_aka.c')
-rw-r--r--src/eap_peer/eap_aka.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/eap_peer/eap_aka.c b/src/eap_peer/eap_aka.c
index 4e08090..da3df0d 100644
--- a/src/eap_peer/eap_aka.c
+++ b/src/eap_peer/eap_aka.c
@@ -840,7 +840,13 @@ static struct wpabuf * eap_aka_process_challenge(struct eap_sm *sm,
#ifdef EAP_AKA_PRIME
if (data->eap_method == EAP_TYPE_AKA_PRIME) {
/* Note: AUTN = (SQN ^ AK) || AMF || MAC which gives us the
- * needed 6-octet SQN ^AK for CK',IK' derivation */
+ * needed 6-octet SQN ^ AK for CK',IK' derivation */
+ u16 amf = WPA_GET_BE16(data->autn + 6);
+ if (!(amf & 0x8000)) {
+ wpa_printf(MSG_WARNING, "EAP-AKA': AMF separation bit "
+ "not set (AMF=0x%4x)", amf);
+ return eap_aka_authentication_reject(data, id);
+ }
eap_aka_prime_derive_ck_ik_prime(data->ck, data->ik,
data->autn,
data->network_name,