From patchwork Wed Aug 16 12:52:02 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: 802432 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="fVUWOeOa"; 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 3xY0rB3PW0z9t3G for ; Thu, 17 Aug 2017 19:13:30 +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:In-Reply-To:References: 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: List-Owner; bh=Jno7z0j1hX0QgSJsFF84h2x827HCSLt0kjMNcCet4fw=; b=fVUWOeOaNjs5lF Ugx4nWk2y/pRSudya8A8G94TgUuQXNMi5saz6xQWEspur/qxAeJ5hlj59/XEyPjwo6dz+eunRaVW1 tfTtRbIFiR60NarRWP01lQuC/+wgnxXibH8luxzAaWMRy0CdLvUgumMkADOqGJABtnOXvZ/0SF5ns ZOxQbVWlVwoE8XVpVivO8Jp2YmPMUrTIrqkl27YfDmLcQjk3U9M1WJy/+NioBxfXpHAsM+5oAUUey woO5W+Nd4gXWUsBlkL7e5A+rhPtxYbPJP6CD9sAKT9xfEusN2fSVMPwLTd344+2V1ouYoh29HPKrN BDLcKQj/ADPHHq9VmJFg==; 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 1diGr4-00074v-5h; Thu, 17 Aug 2017 09:12:42 +0000 Received: from jptosegrel01.sonyericsson.com ([124.215.201.71]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhxoH-0007p6-8g for hostap@lists.infradead.org; Wed, 16 Aug 2017 12:52:39 +0000 From: "Hatano, Tomoharu (Sony Mobile)" To: "Hatano, Tomoharu (Sony Mobile)" , "hostap@lists.infradead.org" Subject: RE: [PATCH] Add AT_KDF attributes to Synchronization-Failure in EAP-AKA' Thread-Topic: [PATCH] Add AT_KDF attributes to Synchronization-Failure in EAP-AKA' Thread-Index: AQHTBPWM5JJgHLqDnUmB/dbzcOaIFqKHEnRg Date: Wed, 16 Aug 2017 12:52:02 +0000 Message-ID: References: <1500953058-4961-1-git-send-email-tomoharu.hatano@sony.com> In-Reply-To: <1500953058-4961-1-git-send-email-tomoharu.hatano@sony.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.153.228.2] MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170816_055234_001486_56FCCD90 X-CRM114-Status: GOOD ( 10.26 ) 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: Thu, 17 Aug 2017 02:12:02 -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: "Hatano, Tomoharu \(Sony Mobile\)" , "Onodera, Akihiro X \(Sony Mobile\)" , "Nanbu, Tomonori \(Sony Mobile\)" , "Sogo, Shinji \(Sony Mobile\)" Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi Hostap, Do you have any progress about review? Best Regards, Tomoharu Hatano -----Original Message----- From: Tomoharu Hatano [mailto:tomoharu.hatano@sony.com] Sent: Tuesday, July 25, 2017 12:24 PM To: hostap@lists.infradead.org Cc: Sogo, Shinji (Sony Mobile) ; Nanbu, Tomonori (Sony Mobile) ; Onodera, Akihiro X (Sony Mobile) ; Hatano, Tomoharu (Sony Mobile) Subject: [PATCH] Add AT_KDF attributes to Synchronization-Failure in EAP-AKA' 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 --- src/eap_peer/eap_aka.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) } 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; -- 2.7.4 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,