Re: [IPsec] Review of draft-ietf-ipsecme-ddos-protection-06

"Valery Smyslov" <svanru@gmail.com> Thu, 23 June 2016 04:26 UTC

Return-Path: <svanru@gmail.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 B838512D808 for <ipsec@ietfa.amsl.com>; Wed, 22 Jun 2016 21:26:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.491
X-Spam-Level:
X-Spam-Status: No, score=-1.491 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.77, SPF_PASS=-0.001, STOX_REPLY_TYPE=0.439] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 S3hzqp8pDfrz for <ipsec@ietfa.amsl.com>; Wed, 22 Jun 2016 21:26:10 -0700 (PDT)
Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7517912D7C3 for <ipsec@ietf.org>; Wed, 22 Jun 2016 21:26:09 -0700 (PDT)
Received: by mail-lf0-x22b.google.com with SMTP id l188so86343104lfe.2 for <ipsec@ietf.org>; Wed, 22 Jun 2016 21:26:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:references:subject:date:mime-version :content-transfer-encoding; bh=rCphFWgiYnzk9Px3g4NYfeK1orPT7537Px/rjIbSLTQ=; b=ZhzKGYf+dTBHgba+3soIqA5H9JS0QjCdNW1rcp4V6GW2y9Kg9/9Ltam03iLTE+Yg53 98UcxQ1/k916uXddhR1rOkyS7oWrT+PIwqrLGJE40ZcT0ZcOHkNMt6aV1Q0/+sO7U1hL RfpJwAgii6b6jVLKNwOM08qL9Pn1JpoHkLJ53/yXZxiPxkMIoQt3MTAQDLSUWDJDSHIn nnKNmOANI+fhJGlZ38VXXKYZAOuLaCbM0Keq2C0wBJFadNlPctI61XICvkmSsAoHWZRv G5ycmHDH7JH9wbum/HUkS6FInyDUG0bCEc4AOuvA1xxB2h7hQhjzNFgxK3DTa1b3JGfs t2vQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:references:subject:date :mime-version:content-transfer-encoding; bh=rCphFWgiYnzk9Px3g4NYfeK1orPT7537Px/rjIbSLTQ=; b=CGsLtDrdHnGcgQIQAGS9O6jLliGK1ZD77RdFrRa1bQ1xHKkMNmGUpG13LzMrHXsJpX EXmIas2Sxn3e1/HYSZ5E2oLpwyTHoGSy8JlaQFmo+6hU9O82f/4uLYnMl2/kBL0vzRE7 XKPnd6SGAAPV2XMt/xhYpkmuIm53gbIFpnrQpWg6svjHAdYH+/EXMc778ZvTVnpSr9Mk LZkYrjDIvtk4Bmos9HgM/F3B+NukRdTKXa1oeZqgdqAte6OC1g0hhYZ9IR0uDPPtEQ7r 7YwUSn+EECE8GyYWf9NkDR6VeLBYDKGs+XkzzPgbva+W9QdrpxJ0nZyMFYDBwwr/CW0y ftZQ==
X-Gm-Message-State: ALyK8tJdbzChmOhAR/J2DhkSuVojwPYSvOadBAxfCh5+rcfN31QzuX2KEYCQvUhh4LfflA==
X-Received: by 10.25.4.4 with SMTP id 4mr8411068lfe.208.1466655967580; Wed, 22 Jun 2016 21:26:07 -0700 (PDT)
Received: from buildpc ([82.138.51.4]) by smtp.gmail.com with ESMTPSA id m6sm341745lbp.38.2016.06.22.21.26.06 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2016 21:26:06 -0700 (PDT)
Message-ID: <CEF018E464704554A8DE06786A5FFC0B@buildpc>
From: Valery Smyslov <svanru@gmail.com>
To: "Waltermire, David A. (Fed)" <david.waltermire@nist.gov>, paul@nohats.ca
References: <alpine.LRH.2.20.1605311635540.16809@bofh.nohats.ca> <4200F5373D5542C985F3D4C51609213C@buildpc> <alpine.LRH.2.20.1606022148040.23132@bofh.nohats.ca> <E61D75BBDD0F4A159352B3258BBAA7DE@buildpc> <alpine.LRH.2.20.1606031155230.11420@bofh.nohats.ca> <A6682BC2468947F1A1669A9B9D558BF5@buildpc> <DM2PR09MB03652AE1734808EFEAC93775F02C0@DM2PR09MB0365.namprd09.prod.outlook.com>
Date: Thu, 23 Jun 2016 07:26:04 +0300
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="iso-8859-1"; reply-type="original"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/gDS-X0UlwRuL1TTr4eZDlH0fIdc>
Cc: ipsec@ietf.org, Yoav Nir <ynir.ietf@gmail.com>
Subject: Re: [IPsec] Review of draft-ietf-ipsecme-ddos-protection-06
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.17
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, 23 Jun 2016 04:26:13 -0000

Hi Dave,

we've already incorporated Paul Wouters' comments in the draft on github.
The only thing that stops us publishing it is Paul's promise to
review the rest of the document (from Sections 7 up to the end).
I've just sent him a reminder asking if he could do it within the next
few days.

BTW, I'm on vacation till Tuesday. So, it's more realistic to post
an updated draft later next week, say Wednesday or Thursday
(I presume that Paul will do his promised review;
otherwise it's possible to post the draft earlier).

Regards,
Valery.


----- Original Message ----- 
From: "Waltermire, David A. (Fed)" <david.waltermire@nist.gov>
To: "Valery Smyslov" <svanru@gmail.com>; <paul@nohats.ca>
Cc: <ipsec@ietf.org>; "Yoav Nir" <ynir.ietf@gmail.com>
Sent: Wednesday, June 22, 2016 8:21 PM
Subject: RE: [IPsec] Review of draft-ietf-ipsecme-ddos-protection-06


Paul and Valery,

We are extremely close on wrapping up this draft. This thread appears to be all that remains before sending the draft to 
the IESG. Can you guys wrap up the final minor wording changes this week?

Valery, once agreement is reached on the text changes, can you post an updated draft early next week that is ready to 
send to the IESG?

Thanks,
Dave



> -----Original Message-----
> From: IPsec [mailto:ipsec-bounces@ietf.org] On Behalf Of Valery Smyslov
> Sent: Monday, June 06, 2016 3:26 AM
> To: paul@nohats.ca
> Cc: ipsec@ietf.org; Yoav Nir <ynir.ietf@gmail.com>
> Subject: Re: [IPsec] Review of draft-ietf-ipsecme-ddos-protection-06
>
> > [ cut everything we agreed ]
> >
> >>> > >      Depending on the Responder implementation, this can be
> repeated
> >>> > >      with
> >>> > >      the same half-open SA.
> >>> > >
> >>> > >   I don't think this "depends on the implemention". Since any on-path
> >>> > >   attacker can spoof rubbish, a Responder MUST ignore the failed
> packet
> >>> > >   and remain ready to accept the real one for a certain about of time.
> >>> >
> >>> >  "Depending on the Responder implementation" means here that if
> >>> > along  with discarding the failed packet the Responder also
> >>> > discards the  computed SK_* keys, then it will need to
> >>> > re-calculate them again  when the next IKE_AUTH packet is
> >>> > received, so the attack can be  repeated. The SK_* keys don't
> >>> > depend on IKE_AUTH messages,  so in general there is no need to
> >>> > discard them even if the received  IKE_AUTH packet failed to
> >>> > decrypt properly, and the draft advises to  keep them in this
> >>> > case. However, implementations may have good reasons  to do this
> >>> > (e.g. to free hardware resources if crypto is performed in  HW).
> >>>
> >>>  Oh, I didnt realise you talked about re-using DH components. Ok, in
> >>> that  case it makes sense but you might want to say it only applies
> >>> to those  who re-use DH calculations between different IKE peers.
> >>> Our software  never does that (and I think FIPS also puts additional
> >>> constraints on
> >>>  this)
> >>
> >> No, it is not about re-using DH private key with different peers. I
> >> probably poorly explained. Let me try again.
> >>
> >> Once the IKE_SA_INIT is complete the responder has all needed data to
> >> calculate SKEYSEED and SK_* keys. However, it is a CPU consuming
> >> operations, so the responder may want to postpone them until the keys
> >> are really needed, i.e. until it receives the IKE_AUTH request from
> >> the initiator.
> >> This behaviour allows responder not to waste resources in case
> >> IKE_SA_INIT was from an attacker and IKE_AUTH request never comes.
> >> Once IKE_AUTH request arrives the responder performs DH, calculates
> >> SKEYSEED and SK_* keys that allows him to decrypt and verify this
> >> request. In case it fails to decrypt IKE_AUTH request, the responder
> >> has two possibilities - keep just calculated SK_* keys until the next
> >> (hopely proper) IKE_AUTH request is received or discard them (e.g. to
> >> save crypto resources) and recalculate them again once the next
> >> IKE_AUTH request is received (note that re-calculating will result in
> >> EXACTLY the same keys, since they don't depent on any data from
> >> IKE_AUTH). The draft recommends to keep the keys until the proper
> >> IKE_AUTH request is received (or until the exchange timed out). This
> >> advise may look obvious, but I think is still worth to mention.
> >>
> >> I recall we've already discussed this while reviewing the -05 version...
> >
> > Ohh okay. I vaguely remember. I guess reading this explanation, I
> > would say it should not be needed to mention it in this document, but
> > it you want to do it anyway, how about:
> >
> > OLD:
> >
> > Depending on the Responder implementation, this can be repeated with
> > the same half-open SA.
> >
> > NEW:
> >
> > If a Responder does not hold on to the calculated SKEYSEED and SK_*
> > keys (which it should in case a valid IKE_AUTH comes in later) this
> > attack might be repeated on the same half-open SA.
>
> OK.
>
> >>>  This does not so much relate to IPv6 but to whether you rather
> >>> overestimate or underestimate the attacker's IP space. If you
> >>> underestimate, you will take longer to punish the attacking IPs. If
> >>> you  overestimate you will needlessly slow down legitimate clients.
> >>>
> >>>  I don't know which of the two is better, hence my objection to "it
> >>> makes  sense" because I don't see that.
> >>
> >> What's your suggestion for this text? Just remove "it make sense" or
> >> completely rewrite the para? If the latter, please provide the text.
> >
> > Something like:
> >
> > For IPv6, ISPs assign between a /48 and a /64, so it does not make
> > sense for rate-limiting to work on single IPv6 IPs. Instead,
> > ratelimits should be done based on either the /48 or /64 of the
> > misbehaving IPv6 address observed.
>
> OK.
>
> >>> > >      When the Responder is under attack, it MAY choose to prefer
> >>> > >      previously authenticated peers who present a Session
> Resumption
> >>> > >      ticket (see [RFC5723] for details).
> >>> > >
> >>> > >   Why is this only a MAY? Why is it not a SHOULD or MUST?
> >>> >
> >>> >  A good question. I think the idea was not to force the Responder
> >>> > to serve only resumed clients and to let him(her) prioterize
> >>> > clients according to its own policy. In my opinion MUST is too
> >>> > strong,  but SHOULD is probably OK.
> >>>
> >>>  In the famous words of Steve Kent, if you say SHOULD instead of
> >>> MUST,  explain when the Responder should not.
> >>
> >> When it has good reasons :-)
> >>
> >> Seriously, consider the situation when the responder finds itself
> >> under attack and switches to only respond to IKE_SA_RESUME requests.
> >> In this case it will leave legitimate clients without resumption
> >> tickets (e.g. ticket expired) out of scope.
> >> I think there is no reasom to put MUST here, since in any case it is
> >> a local policy which dictates the responder's behaviour, and ther are
> >> no interoperability issues whether is is MAY, SHOULD or MUST, it is
> >> just the responder's local policy matter.
> >> So SHOULD is just good advise.
> >
> > Actually, what you are describing is something else:
> >
> > When the Responder is under attack, it MUST NOT prefer previously
> > authenticated peers who present a Session Resumption ticket [RFC5723]
> > as that could cause a complete lock-out of legitimate clients that
> > have no session to resume.
> >
> > Although that is probably better rewritten a bit:
> >
> > When the Responder is under attack, it SHOULD prefer previously
> > authenticated peers who present a Session Resumption ticket [RFC5723]
> > unless the attack itself consists of sending bogus resumption
> > requests, in which case it SHOULD treat resumption and new session
> > requests equally to avoid locking out a class of legitimate clients.
>
> I'd rather change it a bit:
>
>     When the Responder is under attack, it SHOULD prefer previously
>     authenticated peers who present a Session Resumption ticket [RFC5723].
>     However, the Responder SHOULD NOT swich to resumed clients
>     completely (and thus refuse every IKE_SA_INIT request),
>     so that legitimate initiators without resumption tickets still have
>     chances to connect.
>
> >>>  That also
> >>>  avoids what to do when rekey's happen because that would likely
> >>> reset  the counter because it is a new state?
> >>
> >> Well, I think the proper approach is to measure the rate of such
> >> exchanges (per SA or course). So, just reset the counter every second
> >> and measure how many exchanges happened within the second. If the
> >> number looks abusive, take measures.
> >
> > From our implementation point of view "per SA" is difficult, because
> > we delete failed SA states, and then lose the count of those. So in
> > that sense, using global counters makes more sense. For us, a rekey
> > means that the old state is replaced with a new state.
>
> I don't see any problem here. We are talking not about failed exchanges
> (after which the SA must be deleted), but about an abusive number of
> unnecessary exchanges, which are successful from IKEv2 point of view.
> You can very well count their number per SA and it is not a big deal to reset
> counters when IKE SA is rekeyed.
>
> > so perhaps it is useful to elaborate a little more?
>
> Isn't all this a local matter of implementation?
> I don't think we need to mandate how implementations decide whether
> they are under attack.
>
> > Paul
>
> Regards,
> Valery.
>
> _______________________________________________
> IPsec mailing list
> IPsec@ietf.org
> https://www.ietf.org/mailman/listinfo/ipsec