Re: AD Evaluation: draft-ietf-6man-predictable-fragment-id

Brian Haberman <brian@innovationslab.net> Mon, 24 August 2015 13:55 UTC

Return-Path: <brian@innovationslab.net>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F362D1A1A31; Mon, 24 Aug 2015 06:55:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
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 latuiofVR10V; Mon, 24 Aug 2015 06:55:51 -0700 (PDT)
Received: from uillean.fuaim.com (uillean.fuaim.com [206.197.161.140]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DF1C01A1A2D; Mon, 24 Aug 2015 06:55:51 -0700 (PDT)
Received: from clairseach.fuaim.com (clairseach-high.fuaim.com [206.197.161.158]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by uillean.fuaim.com (Postfix) with ESMTP id C23C388127; Mon, 24 Aug 2015 06:55:51 -0700 (PDT)
Received: from clemson.jhuapl.edu (swifi-nat.jhuapl.edu [128.244.87.133]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by clairseach.fuaim.com (Postfix) with ESMTP id 6B22A328081A; Mon, 24 Aug 2015 06:55:51 -0700 (PDT)
Subject: Re: AD Evaluation: draft-ietf-6man-predictable-fragment-id
To: Fernando Gont <fgont@si6networks.com>, draft-ietf-6man-predictable-fragment-id@ietf.org, "ipv6@ietf.org" <ipv6@ietf.org>
References: <55D76AFD.2070000@innovationslab.net> <55D7D577.3010301@si6networks.com> <55DB0B87.5030200@innovationslab.net> <55DB1172.9030901@si6networks.com> <55DB155C.5020500@innovationslab.net> <55DB1DBF.5060909@si6networks.com>
From: Brian Haberman <brian@innovationslab.net>
X-Enigmail-Draft-Status: N1110
Message-ID: <55DB225E.9070907@innovationslab.net>
Date: Mon, 24 Aug 2015 09:55:42 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <55DB1DBF.5060909@si6networks.com>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="0Q3fogtcIIwQhc1wnM9fdwV3DFBl9WJBb"
Archived-At: <http://mailarchive.ietf.org/arch/msg/ipv6/b8umjrYju8o_dN8CG5gjDMWi6ic>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Aug 2015 13:55:57 -0000


On 8/24/15 9:35 AM, Fernando Gont wrote:

> 
>> As I noted in my last comment, it seems like the Fragment ID is
>> re-generated any time a Fragment Header is needed.  Is there any reason
>> why secret1 couldn't/shouldn't be changed each time a Fragment Header is
>> needed?
> 
> Frag ID is generated ("Identification" recomputed) for each fragmented
> packet. for any given (src, dst), F() will be constant.
> 
> So the idea is that F() provides a radom number/offset, which will
> remain constant for each pair (src, dst). Since "counter" is a "line",
> "Identification" is esentially:

As with secret1, where does it say that counter[] is a line?  Wouldn't
it make more sense to initialize counter[] to random values?  That makes
things even less guessable.

> 
> ID = m x + b = counter + F()
> 
> i.e. a line with a random offeset.
> 

I think there is a lot of missing explanatory text.  The above argues
that secret2 is also constant given your above statement.  And your
statement about counter[] being a "line" is no where in the draft.  When
I look at this:

ID = F(Src IP, Dst IP, secret1) + counter[G(src IP, Dst Pref, secret2)]

I can see a number of ways that an implementation could completely
randomize the ID selected so that no one could guess it.  For example,
secret1 or secret2 (or both) could be randomized (e.g., TOD).

> 
> The reason for using this algorithm is that it results in a sequence
> that is not predictable by an off-path attacker. However, since
> sbsequent identifications are simply monotonically-increasing numbers
> (as a result of counter), the frag id collision rate will be wayyyy
> lower than that of simply randmizing the IDs (the collission rate is the
> same as that of a global counter).
> 

Various research papers have talked about the number of packets
typically involved in a "flow" between a single pair of devices.  The
math would indicate that randomizing the Fragment ID selection across a
32-bit space given the number of packets in a flow provides a very low
probability of collision.

The destination clearly does not need to be able to guess what the next
Fragment ID would be, so there is no functional reason for the IDs to be
sequential.

My suggestion would be to state the assumptions you are making (e.g.,
secretX is constant, counter[] is a line), why you are making those
assumptions (e.g., ease of implementation), and the performance
tradeoffs you are making.

Regards,
Brian

> 
> 
>>> FWIW, the expression in Section 5.3 replaces the "counter" variable
>>> (from the simplified expression I wrote above) with an array of
>>> counters, such that we can avoid the use of a single global counter (to
>>> avoid e.g.  [Sanfilippo1998b] and [Sanfilippo1999])
>>
>> Right, the counter[] contains 8K elements or more where an element is
>> randomly selected via a hash function.  If that is the case, how does
>> the destination know what the next Fragment ID will be?
> 
> They are "randomly selected", but, as with F(), for each (src ip, dst
> ip), you will always select the same counter. So unless another flow
> happens to use the same counter, if you receive one fragmented packet
> with a frag ID of "M", the next frag packet will have an ID of "M+1".
> 
> (again, the reason for this is as before: reduce the frag id reuse
> frequency, so that yu get the same frequency as a global counter, but
> without its sec implications).
> 
> Thanks!
> 
> Best regards,
>