Re: [IPsec] What's the most reasonable way for the responder to handle the request containing unknown Key Exchange methods

"Panwei (William)" <william.panwei@huawei.com> Tue, 06 February 2024 09:17 UTC

Return-Path: <william.panwei@huawei.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF96CC14F6BE for <ipsec@ietfa.amsl.com>; Tue, 6 Feb 2024 01:17:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jkJuntFsakxw for <ipsec@ietfa.amsl.com>; Tue, 6 Feb 2024 01:17:26 -0800 (PST)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6944BC14F61A for <ipsec@ietf.org>; Tue, 6 Feb 2024 01:17:26 -0800 (PST)
Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TTcxQ6BFFz6JB2r for <ipsec@ietf.org>; Tue, 6 Feb 2024 17:13:46 +0800 (CST)
Received: from lhrpeml500006.china.huawei.com (unknown [7.191.161.198]) by mail.maildlp.com (Postfix) with ESMTPS id AD567140F36 for <ipsec@ietf.org>; Tue, 6 Feb 2024 17:17:23 +0800 (CST)
Received: from kwepemi500010.china.huawei.com (7.221.188.191) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 6 Feb 2024 09:17:23 +0000
Received: from kwepemi500010.china.huawei.com (7.221.188.191) by kwepemi500010.china.huawei.com (7.221.188.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 6 Feb 2024 17:17:21 +0800
Received: from kwepemi500010.china.huawei.com ([7.221.188.191]) by kwepemi500010.china.huawei.com ([7.221.188.191]) with mapi id 15.01.2507.035; Tue, 6 Feb 2024 17:17:21 +0800
From: "Panwei (William)" <william.panwei@huawei.com>
To: Tero Kivinen <kivinen@iki.fi>
CC: "ipsec@ietf.org" <ipsec@ietf.org>
Thread-Topic: [IPsec] What's the most reasonable way for the responder to handle the request containing unknown Key Exchange methods
Thread-Index: AdpYNcfe9ZYfZMnUS7SS4j6Mdob8o///1wWA//6JxQA=
Date: Tue, 06 Feb 2024 09:17:20 +0000
Message-ID: <0edb992d80c54ceaa66b4c49d8cfa692@huawei.com>
References: <5e48af661d63445794b649649519ea65@huawei.com> <26049.11833.624551.934540@fireball.acr.fi>
In-Reply-To: <26049.11833.624551.934540@fireball.acr.fi>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.164.106.52]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/dTYgvbV-Lwyv_CHPRTOM3prs8NU>
Subject: Re: [IPsec] What's the most reasonable way for the responder to handle the request containing unknown Key Exchange methods
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Feb 2024 09:17:32 -0000

Hi Tero,

Thank you very much for your feedback. I'm glad to see that your thoughts concur with mine. It really helps.

Regards & Thanks!
Wei PAN (潘伟)

    > -----Original Message-----
    > From: Tero Kivinen <kivinen@iki.fi>
    > Sent: Tuesday, February 6, 2024 2:52 AM
    > To: Panwei (William) <william.panwei@huawei.com>
    > Cc: ipsec@ietf.org
    > Subject: [IPsec] What's the most reasonable way for the responder to
    > handle the request containing unknown Key Exchange methods
    > 
    > Panwei \(William\) writes:
    > > The handling I suggest is as follows:
    > >
    > >     1) if all KE methods proposed by the initiator are unknown to the
    > > responder, i.e., no KE method is acceptable, then the responder
    > > replies NO_PROPOSAL_CHOSEN, no matter what KE method is used in the
    > KE payload.
    > >
    > >     2) if at least one acceptable KE method is included in the
    > > initiator’s proposals, the responder can select one acceptable KE
    > > method, ignore the unknown KE methods, and perform the next step of
    > KE Payload processing.
    > >
    > >        2.1) if the KE method used in the KE payload happens to be the
    > > same as this selected KE method, then the responder normally replies
    > > with this selected KE method and the corresponding KE payload.
    > >
    > >        2.2) if the KE method used in the KE payload is different from
    > > this selected KE method, then the responder replies
    > INVALID_KE_PAYLOAD
    > > with this selected KE method, regardless of whether the KE method used
    > > in the KE payload is known or unknown to the responder.
    > 
    > This is correct processing.
    > 
    > Note, that any unknown KE method cannot be accaptable for the policy,
    > thus they are not allowed by the policy, and if there are any KE methods
    > which are acceptable to policy we use that, and if the KE payload is not
    > using that you send INVALID_KE_PAYLOAD and indicate the KE method you
    > want to use.
    > 
    > This processing is same for the known and unknown KE methods, there is
    > no difference there.
    > 
    > Of course the initiator will include the exactly same SA payload listing all
    > those unknown KE methods when it retries with the KE method listed in the
    > INVALID_KE_PAYLOAD.
    > 
    > > However, others suggest that the responder should terminate the IKE
    > > exchange without reply, when the KE method used in the KE payload is
    > > unknown to the responder, even if there are other acceptable KE
    > > methods proposed in the SA payload.
    > 
    > If there is anything in the RFC7296 that would suggest that kind of
    > processing is valid, we need to fix that. The RFC7296 tries to be extendable,
    > thus it tries to ignore unknown values, and process things without them.
    > 
    > For example in implementation I was familiar with there were not unknown
    > algorithms, all values for algorithms or methods were valid from IKEv2
    > point of view, and those values were then matched against policy, but of
    > course policy only allowed values that implementation actually
    > recognized...
    > 
    > > Because they feel the unknown KE method in the KE payload means that
    > > the whole packet is an invalid packet, and discarding this packet is
    > > the thing to do.
    > 
    > I have no idea where they think RFC7296 says anything like that.
    > --
    > kivinen@iki.fi