From patchwork Tue Jul 25 03:24:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hatano, Tomoharu (Sony Mobile)" X-Patchwork-Id: 793940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="g3H49dr5"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xHcWD2zq9z9s7g for ; Thu, 27 Jul 2017 00:12:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gZIPM572lKSojetlU3fp83OZ9P3fEYliiudnNj0rj/s=; b=g3H49dr5nm0R1z +W1JRU9bltRe6wvfhES2o5CPpS2h3rQD/ERHgyUi5klymFah5dnKlJkUA6T4ISiqKkhqm/s4euA5L ksV/KwBsbZyn2uTeyiINQ9zGyDQ4H9QUZ6W0FHJw2cg6+Cu/SECorPhEKWCX7FRXlY21ugPrfnmtM cSsqmja5eqQPM04HkWZgOX8csWjzY4txm4yd6qG7p2RDtvnZuwc6KloziVQ+29kyQG2Kl1gy+qACx 0+er+O7ZrwT1hO+BOpMuOXfom+7IBcMKg44h5BczHAcapn+Stsnd/p2mfFDHq7SiKYUmbr40Is3Dq tvCz9Nh43YBJN4LTrJvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1daN2d-0001IW-No; Wed, 26 Jul 2017 14:11:59 +0000 Received: from jptosegrel01.sonyericsson.com ([124.215.201.71]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dZqVi-0006TU-A1 for hostap@lists.infradead.org; Tue, 25 Jul 2017 03:27:52 +0000 From: Tomoharu Hatano To: Subject: [PATCH] Add AT_KDF attributes to Synchronization-Failure in EAP-AKA' Date: Tue, 25 Jul 2017 12:24:18 +0900 Message-ID: <1500953058-4961-1-git-send-email-tomoharu.hatano@sony.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170724_202750_490481_8728B4F5 X-CRM114-Status: UNSURE ( 7.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Mailman-Approved-At: Wed, 26 Jul 2017 07:11:36 -0700 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomoharu Hatano , Akihiro Onodera , Tomonori.Nanbu@sony.com, Shinji.Sogo@sony.com Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Akihiro Onodera AT_KDF attributes need to be included in Synchronization-Failure according to EAP-AKA' specification RFC5448. Change-Id: I5d1c2c1371094fdc39ee155ef83d6143ac8f37eb Signed-off-by: Tomoharu Hatano Signed-off-by: Tomoharu Hatano --- src/eap_peer/eap_aka.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/eap_peer/eap_aka.c b/src/eap_peer/eap_aka.c index 0bac62d..981bea2 100644 --- a/src/eap_peer/eap_aka.c +++ b/src/eap_peer/eap_aka.c @@ -570,7 +570,7 @@ static struct wpabuf * eap_aka_authentication_reject(struct eap_aka_data *data, static struct wpabuf * eap_aka_synchronization_failure( - struct eap_aka_data *data, u8 id) + struct eap_aka_data *data, u8 id, struct eap_sim_attrs *attr) { struct eap_sim_msg *msg; @@ -584,6 +584,12 @@ static struct wpabuf * eap_aka_synchronization_failure( wpa_printf(MSG_DEBUG, " AT_AUTS"); eap_sim_msg_add_full(msg, EAP_SIM_AT_AUTS, data->auts, EAP_AKA_AUTS_LEN); + if (data->eap_method == EAP_TYPE_AKA_PRIME) { + size_t i; + for (i = 0; i < attr->kdf_count; i++) { + eap_sim_msg_add(msg, EAP_SIM_AT_KDF, attr->kdf[i], NULL, 0); + } + } return eap_sim_msg_finish(msg, data->eap_method, NULL, NULL, 0); } @@ -966,7 +972,7 @@ static struct wpabuf * eap_aka_process_challenge(struct eap_sm *sm, } else if (res == -2) { wpa_printf(MSG_WARNING, "EAP-AKA: UMTS authentication " "failed (AUTN seq# -> AUTS)"); - return eap_aka_synchronization_failure(data, id); + return eap_aka_synchronization_failure(data, id, attr); } else if (res > 0) { wpa_printf(MSG_DEBUG, "EAP-AKA: Wait for external USIM processing"); return NULL;