Re: [IPsec] NO_PROPOSAL_CHOSEN vs INVALID_SYNTAX

Tommy Pauly <tpauly@apple.com> Thu, 20 June 2019 15:52 UTC

Return-Path: <tpauly@apple.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 0BE6F12011E for <ipsec@ietfa.amsl.com>; Thu, 20 Jun 2019 08:52:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.01
X-Spam-Level:
X-Spam-Status: No, score=-7.01 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 235xIyY1wqCL for <ipsec@ietfa.amsl.com>; Thu, 20 Jun 2019 08:52:21 -0700 (PDT)
Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2A4C512010F for <ipsec@ietf.org>; Thu, 20 Jun 2019 08:52:21 -0700 (PDT)
Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x5KFq3Le065113; Thu, 20 Jun 2019 08:52:19 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=DDmiGLnXUzIlT6CMd21HpHCug40PsNVvNvmdQQvAGg0=; b=kCDKoUiPqId3obwV9ZYHzXAXKSF53etthSMvQPygAiL1alr/h9zrwW9mgThoUUouSTJt M6RVEAKFSrFVXfHX+wOn47y8filpw9gZBJp941y6Wu95RRBFrmhTyC3XR+CKtstPIdAd UaO8oeex9jG08JTT1lqQuVdqfEHDl2P69bfzLRZndPQgC24oSCoRGP3/d53JD4Bejd0s TYk2jVBgTtuwnsrnVxmrXO9mKrCx+omnubDJ/Ngo5+9UHmsfZm8gce4XBjo3Jga/0k4E mzMwqdRM7Gk1KNviqboHv7RORvBBUbmYJ1ENNVXqjF+pLO9k42jcW0Gb6CwMzy1h2A4+ Qg==
Received: from mr2-mtap-s03.rno.apple.com (mr2-mtap-s03.rno.apple.com [17.179.226.135]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 2t820utvyh-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 20 Jun 2019 08:52:19 -0700
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_dg5yK3BhD6x8JOGy9LRgxg)"
Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by mr2-mtap-s03.rno.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0PTE00HGTMR2ZA80@mr2-mtap-s03.rno.apple.com>; Thu, 20 Jun 2019 08:52:15 -0700 (PDT)
Received: from process_milters-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0PTE00000MFHV100@nwk-mmpp-sz13.apple.com>; Thu, 20 Jun 2019 08:52:14 -0700 (PDT)
X-Va-A:
X-Va-T-CD: 6fac4ea4ce1268ab8f029544b781c2d5
X-Va-E-CD: 1f559111330cf8762e01d43a53052495
X-Va-R-CD: 061c326c74df9fe43e37225ff7ccc6c7
X-Va-CD: 0
X-Va-ID: 9b55545f-675f-4327-899c-21ad1ecbfb1f
X-V-A:
X-V-T-CD: 6fac4ea4ce1268ab8f029544b781c2d5
X-V-E-CD: 1f559111330cf8762e01d43a53052495
X-V-R-CD: 061c326c74df9fe43e37225ff7ccc6c7
X-V-CD: 0
X-V-ID: 623f3e01-f375-41b7-bff1-f749a2f7bb52
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-20_11:,, signatures=0
Received: from [17.230.151.181] by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0PTE00JOWMQKI120@nwk-mmpp-sz13.apple.com>; Thu, 20 Jun 2019 08:51:57 -0700 (PDT)
Sender: tpauly@apple.com
From: Tommy Pauly <tpauly@apple.com>
Message-id: <CC563EF8-F15B-4073-8C49-787C2C9F6723@apple.com>
Date: Thu, 20 Jun 2019 08:51:45 -0700
In-reply-to: <028201d52775$f89a8230$e9cf8690$@gmail.com>
Cc: "ipsec@ietf.org WG" <ipsec@ietf.org>
To: Valery Smyslov <smyslov.ietf@gmail.com>, Paul Wouters <paul@nohats.ca>
References: <alpine.LRH.2.21.1906200940420.9218@bofh.nohats.ca> <028201d52775$f89a8230$e9cf8690$@gmail.com>
X-Mailer: Apple Mail (2.3445.104.2)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-20_11:, , signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/C8e2AHGgmjufT_pRNDmggcreuHs>
Subject: Re: [IPsec] NO_PROPOSAL_CHOSEN vs INVALID_SYNTAX
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 20 Jun 2019 15:52:24 -0000

It does seem to a question open to interpretation by the implementation.

I think you can make a good argument for NO_PROPOSAL_CHOSEN in both cases. If your implementation interprets things as always getting a list of valid proposal values based on the remote address or ID, then any unknown client would match the empty list of proposals.

Thanks,
Tommy

> On Jun 20, 2019, at 7:39 AM, Valery Smyslov <smyslov.ietf@gmail.com> wrote:
> 
> Hi Paul,
> 
> generally the INVALID_SYNTAX must be returned when something
> fatal happened, that cannot be fixed by adjusting configuration etc.,
> only re-installing app after bug-fixing would help.
> In contrast, NO_PROPOSAL_CHOSEN means that after some actions from 
> operator the connection would succeed.
> 
>> Hi,
>> 
>> We are having a discussion about which notify to return in certain
>> cases. The issue comes down to the names of the notifies and their
>> actual dictated use in the RFC that does not always intuitively
>> maps to the name.
>> 
>> NO_PROPOSAL_CHOSEN can be interpreted as "no proposal from the IKE/IPsec
>> proposal list matches due to all proposals having at least one mismatching
>> transform" versus "no matching ike connection for your IKE proposal"
>> where proposal refers to the entire IKE proposal, not the proposals
>> list with transforms.
>> 
>> INVALID_SYNTAX can be interpreted as "malformed packet" but the RFC text
>> uses this as the "if all other errors dont match, use this one" so you
>> can end up returning this even if there is no invalid syntax at all.
>> 
>> So if your IPsec gateway only has static IP based VPNs and an unknown IP
>> connects, some feel NO_PROPOSAL_CHOSEN conveys that, while technically,
>> even though there is no invalid syntax in that proposal, the RFC states
>> we should return INVALID_SYNTAX.
> 
> I'd rather not return anything in this case.
> 
>> Similarly, if during IKE_AUTH you are finding out there is no IPsec
>> configuration that matches the incoming client, there is no "proposal
>> list" to compare, so while NO_PROPOSAL_CHOSEN feels a more natural
>> match, should we really return INVALID_SYNTAX despite there being no
>> syntax problem? That is what the RFC says.
> 
> I'd return NO_PROPOSAL_CHOSEN.
> 
> Regards,
> Valery.
> 
>> I guess in the end, we are really missing a "CONNECTION_REJECTED"
>> notify that would cover all the things not covered in the more specific
>> notifies.
>> 
>> What do other implementations do? Should we clarify this anywhere?
>> 
>> libreswan was using NO_PROPOSAL_CHOSEN for most of these, but is now
>> slated to be more strict to the RFC and use INVALID_SYNTAX. (and
>> clearly, I'm not happy about it but it seems the RFC dictates this)
>> 
>> Paul
>> 
>> _______________________________________________
>> IPsec mailing list
>> IPsec@ietf.org
>> https://www.ietf.org/mailman/listinfo/ipsec
> 
> _______________________________________________
> IPsec mailing list
> IPsec@ietf.org <mailto:IPsec@ietf.org>
> https://www.ietf.org/mailman/listinfo/ipsec <https://www.ietf.org/mailman/listinfo/ipsec>