Re: [IPsec] draft-ietf-ipsecme-failure-detection-01 -- issue 193

Yoav Nir <ynir@checkpoint.com> Wed, 20 October 2010 08:08 UTC

Return-Path: <ynir@checkpoint.com>
X-Original-To: ipsec@core3.amsl.com
Delivered-To: ipsec@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 9BEDC3A69D0 for <ipsec@core3.amsl.com>; Wed, 20 Oct 2010 01:08:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.52
X-Spam-Level:
X-Spam-Status: No, score=-2.52 tagged_above=-999 required=5 tests=[AWL=0.079, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5gNXCkN43jpN for <ipsec@core3.amsl.com>; Wed, 20 Oct 2010 01:08:22 -0700 (PDT)
Received: from michael.checkpoint.com (smtp.checkpoint.com [194.29.34.68]) by core3.amsl.com (Postfix) with ESMTP id 16F7D3A686A for <ipsec@ietf.org>; Wed, 20 Oct 2010 01:08:18 -0700 (PDT)
X-CheckPoint: {4CBEA20D-10000-1B221DC2-2FFFF}
Received: from il-ex01.ad.checkpoint.com (il-ex01.checkpoint.com [194.29.34.26]) by michael.checkpoint.com (8.13.8/8.13.8) with ESMTP id o9K89lZW003576 for <ipsec@ietf.org>; Wed, 20 Oct 2010 10:09:47 +0200
Received: from il-ex01.ad.checkpoint.com ([126.0.0.2]) by il-ex01.ad.checkpoint.com ([126.0.0.2]) with mapi; Wed, 20 Oct 2010 10:09:47 +0200
From: Yoav Nir <ynir@checkpoint.com>
To: IPsecme WG <ipsec@ietf.org>
Date: Wed, 20 Oct 2010 10:09:45 +0200
Thread-Topic: [IPsec] draft-ietf-ipsecme-failure-detection-01 -- issue 193
Thread-Index: ActwLijBnQQSmOPWRrW3wux1YgGpDw==
Message-ID: <081AA6D0-20F1-48CA-83E9-A868BAFE54D3@checkpoint.com>
References: <E1643BA1-A120-41F0-BC24-5196F38C82F6@cisco.com> <4CBAF29C.7000805@gmail.com> <C0DF9464-B796-4034-B7EC-62A5A67DA6F5@checkpoint.com> <415E5B43-C885-4C26-85F4-966432B2D744@cisco.com>
In-Reply-To: <415E5B43-C885-4C26-85F4-966432B2D744@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [IPsec] draft-ietf-ipsecme-failure-detection-01 -- issue 193
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Wed, 20 Oct 2010 08:08:24 -0000

Hi all

I have started this thread about this issue a week ago, and so far the only responses we have had are from Yaron and Frederic. I would like to hear some more, because this issue is very central.

Here's a summary of my take on this issue.

The draft does not mandate any particular method of token generation (in this, we follow the example of the stateless cookie in RFC 5996). It does, however, suggest two such methods, both of which are somewhat similar to the cookie generation method suggested in RFC 5996:

1. The method in section 5.1 involves hashing a secret with the IKE SPIs
2. The method in section 5.2 involves hashing a secret with the IKE SPIs and the token taker's IP address.

The big disadvantage of the method in 5.2 is that whenever the token taker's IP address changes (as is common for roaming clients) the Token has to be replaced. The advantage is that in a certain configuration (details below) it prevents a token discovery attack. This attack involves tricking one gateway to send a clear QCD token for an IKE SA owned by another gateway. If a cluster is located behind a load balancer, at attacker can attempt to send fake IKE messages from various IP addresses, until those requests reach the "wrong" gateway, which will generate a QCD token that can be used to cause the original token taker to disconnect.

Details of this scenario: For this attack to take place, we need all of the following:
 - A group of gateways, all sharing the same QCD token secret.
 - A disjoint IKE SA database, meaning that IKE SAs are not synchronized. One member in this cluster cannot know if a particular IKE SA exists on another member.
 - The ability of an attacker to direct requests to different members (either by varying its IP address or by directly addressing the member), and a willingness of all members to reply with a QCD token.

We are not saying that having such no-sync clusters is a good idea. In fact, it may be a good idea to recommend against them in the ipsecha document. But they do exist. I have no problem recommending that implementations that don't have such concerns just go ahead and implement the method in 5.1, but since these things do exist, I think it's OK to recommend the method in 5.2 for these configurations.  Frederic is apparently with me on this, which is good. Yaron has some doubts, though, and we'd really like to hear what other people think.

Yoav

On Oct 17, 2010, at 9:29 PM, Frederic Detienne wrote:

> 
> This type of debate happened before and once again, it is critical to design a secure protocol rather than a protocol that can/may be implemented securely.
> 
> The rejoinder is to
> - offer recommended cookie computation methods
> - highlight the risks of each method and the risks of doing something else
> 
> This way, those who follow the spec can ascertain their computation method is secure and has a well defined domain of applicability.
> 
> I feel the draft is headed in the right direction.
> 
> If we take out computation methods, we probably ought to restrict the domain of applicability of the specification and/or spend more time highlighting the risk of do-it-yourself cookie methods. Neither option looks attractive.
> 
> Notice the problem of address-less cookie is not limited to load balanced clusters. If the attacker can somehow target a device owning the QCD cookie-generating-key but not owning the SA, this attacker may gain access to the QCD token for a given SPI. This applies _for instance_ to HSRP pairs if the real addresses of the devices are accessible by the attacker and if the standby device accepts connections. This is just an example but it is likely to affect many implementations in practice.
> 
> The address-less method will likely require more severe warnings in order to restrict or constraint its domain of applicability.
> 
> regards,
> 
> 	fred
> 
> On 17 Oct 2010, at 15:41, Yoav Nir wrote:
> 
>> 
>> On Oct 17, 2010, at 2:57 PM, Yaron Sheffer wrote:
>> 
>>> Hi Frederic,
>>> 
>>> I understand the scenario now and I agree that a solution is needed. But 
>>> I have two issues, one general and one specific:
>>> 
>>> - Even though there are no interoperability implications, I think we 
>>> should specify the token format. This will prevent people from making 
>>> some security-critical design mistakes. In other words, we should have 
>>> *one* token generation method.
>> 
>> Since there are no interoperability implications, I thing we should not specify the format, merely suggest it. Same as we suggest a Cookie format in RFC 5996:
>>                     The exact
>>  algorithms and syntax used to generate cookies do not affect
>>  interoperability and hence are not specified here.  The following is
>>  an example of how an endpoint could use cookies to implement limited
>>  DoS protection.
>> 
>> Also, if different methods match different scenarios, I don't think we should have any problem with specifying^H^H^H^H^H^H^H^H^H^H suggesting *two* methods. I would not want to implement the method in section 5.2 just because somebody has some issues with a load balancer.
>> 
>>> 
>>> - The proposed method uses the taker's IP address, making some 
>>> assumptions on the load balancer's behavior. But what if the load 
>>> balancer behaves a bit differently, e.g. by including the source port in 
>>> the decision function? Such a system will still have the vulnerability. 
>>> What if we choose instead to include the *maker* identity (a sequential 
>>> member number, or a private IP, or even a MAC address)? This would 
>>> prevent another member from re-generating the same token for an 
>>> attacker, and as a side benefit, will not require token changes when the 
>>> client is roaming.
>> 
>> Yes, but this will interact badly with clusters. We actually do want two cluster members to return the same tokens for the same IKE SPIs. If they have their states synched often, then it's no problem, because they both know which IKE SAs exist, and which do not. If they don't have their states synched and they are hot-standby, we also don't have a problem, because a fail-over is like a reboot (but much faster), and you can't get a response from the non-active member. The only problem scenario is when you have load sharing and no synchronized state, and no control over the load balancer (otherwise, I would tell it to balance by the initiator's IKE SPI).  So if one member fails, you can't get the others to offer valid QCD tokens, and the IKE SAs have to take the long route to recovery. With the method in 5.2, the other members (which don't have state) can still create valid QCD tokens, to get all those clients that connected to the down gateway to begin IKE again. 
>> 
>>> 
>>> Thanks,
>>> 	Yaron
>>> 
>>> On 15/10/10 11:53, Frederic Detienne wrote:
>>>> Hi Yaron,
>>>> 
>>>> In response to issue 193. For reference:
>>>> 
>>>> --8<--
>>>> Section 9.3: this entire discussion is probably redundant, because when a node fails in the LS cluster, you switch to another node. Implementing QCD on top of this is probably an overkill. If we remove this section, we can get rid of sec. 5.2 as well, and we can focus on a single recommended way to generate the token, which would make analysis that much easier.
>>>> --8<--
>>>> 
>>>> 9.3 has been moved to 10.4 under security consideration. I will refer to 10.4 instead of 9.3 from now on.
>>>> 
>>>> The token generation method highlighted in 5.1 presents a security risk highlighted in section 10.4.
>>>> 
>>>> We can not get rid of 5.2 nor 10.4, however we could make it clearer that 5.2 is the recommended token generation method when the risk highlighted in10.4 is present.
>>>> 
>>>> Regards,
>>>> 
>>>> 	fred
>>>> 
>>>> _______________________________________________
>>>> IPsec mailing list
>>>> IPsec@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/ipsec
>>> 
>>> Scanned by Check Point Total Security Gateway.
>> 
> 
> 
> Scanned by Check Point Total Security Gateway.