Re: Re: Review of draft-gont-6man-deprecate-atomfrag-generation-01
Ray Hunter <v6ops@globis.net> Wed, 17 September 2014 07:01 UTC
Return-Path: <v6ops@globis.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 EBA2D1A03B1 for <ipv6@ietfa.amsl.com>; Wed, 17 Sep 2014 00:01:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.553
X-Spam-Level:
X-Spam-Status: No, score=-3.553 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-1.652, SPF_PASS=-0.001] 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 3ArDaty5KcAf for <ipv6@ietfa.amsl.com>; Wed, 17 Sep 2014 00:01:42 -0700 (PDT)
Received: from globis01.globis.net (mail.globis.net [IPv6:2001:470:1f15:62e::2]) by ietfa.amsl.com (Postfix) with ESMTP id 6673D1A038D for <6man@ietf.org>; Wed, 17 Sep 2014 00:01:42 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by globis01.globis.net (Postfix) with ESMTP id D73C5871611; Wed, 17 Sep 2014 09:01:40 +0200 (CEST)
Received: from globis01.globis.net ([127.0.0.1]) by localhost (mail.globis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rnTHVLdnRHV2; Wed, 17 Sep 2014 09:01:40 +0200 (CEST)
Received: from Rays-iMac.local (unknown [IPv6:2001:470:1f15:73a:79f4:da1e:56e6:e032]) (Authenticated sender: Ray.Hunter@globis.net) by globis01.globis.net (Postfix) with ESMTPSA id 8E974871514; Wed, 17 Sep 2014 09:01:40 +0200 (CEST)
Message-ID: <541931B3.50700@globis.net>
Date: Wed, 17 Sep 2014 09:01:07 +0200
From: Ray Hunter <v6ops@globis.net>
User-Agent: Postbox 3.0.11 (Macintosh/20140602)
MIME-Version: 1.0
To: Fernando Gont <fgont@si6networks.com>
Subject: Re: Re: Review of draft-gont-6man-deprecate-atomfrag-generation-01
References: <1410858271.812.20.camel@localhost> <54189D99.3020501@si6networks.com>
In-Reply-To: <54189D99.3020501@si6networks.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/ipv6/0A3H6JGuGDE2dmUgDgLqC3Bcpt8
Cc: 6man@ietf.org, Hannes Frederic Sowa <hannes@redhat.com>
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: <http://www.ietf.org/mail-archive/web/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: Wed, 17 Sep 2014 07:01:46 -0000
Fernando Gont wrote: > Hi, Hannes, > > Thanks so much for the review! Please find my comments in-line... > > On 09/16/2014 06:04 AM, Hannes Frederic Sowa wrote: >>> o Only the IPv6 addresses of the IPv6 packet embedded in the ICMPv6 >>> payload need to be forged. While one could envision filtering >>> devices enforcing BCP38-style filters on the ICMPv6 payload, the >>> use of extension (by the attacker) could make this difficult, if >>> at all possible. >> On FreeBSD and Linux you must hit an open socket to get the ICMP PtB >> error to be accepted. E.g. FreeBSD does not deal with ICMP PtB messages >> at all on UDP and on both, FreeBSD and Linux, the payload of the ICMP >> message will also be checked to the TCP-window. > > What if the TCP header is not there? Is the ICMPv6 dropped? > > (Actually, I'll try to check that with a current Linux kernel..) > > >> So the unkown variables >> for an attacker would be the connection quadruple and the sequence >> numbers. Hitting non-connected UDP on Linux sockets seems pretty easy, >> but TCP might not be as easy. > > Does an ICMPv6 PTB targetted at a UDP socket span all sockets with that > Destination Address? i.e., could I use UDP (which enforces fewer checks) > to attack TCP flows? I think the basic question is "what do the Linux kernel developers consider as a 'flow'?" RFC 1192 and RFC 4821 are deliberately vague. You are correct, Fernando: if the flow is simply cached based on <destination address> then you could use UDP to attack TCP. But even if a "flow" is identified as the duple <destination address, transport protocol> then you could also potentially target an attack against NFS or FCIP over TCP by targeting an HTTP or other seemingly innocuous loopback process listening on another interface on the device, that may connected to a completely different network. if a "flow" was identified as the triple <destination address, transport protocol, outbound interface> or<destination address, transport protocol, sourceaddress> that attack would be tougher. However, if the "flow" was <destination address, sourceaddress, transport protocol, source port, destination port> you'd be far less likely to be able to cache the learned MTU to be used on other sessions, meaning PMTUD effectively becomes PLPMTUD. Unless the developers used something like <destination address, sourceaddress, transport protocol, "passive open port"> and remembered which party initiated the flow via a passive open (server) and which an active open (client). > > [....] >>> In such a scenario, if each translator were to select the IPv4 >>> Fragment Identification on its own (rather than selecting the IPv4 >>> Fragment ID from the low-order 16-bits of the Fragment Identification >>> of atomic fragments), this could possibly lead to IPv4 Fragment ID >>> collisions. However, since a number of implementations set IPv6 >>> Fragment ID according to the output of a Pseudo-Random Number >>> Generator (PRNG) (see Appendix B of >>> [I-D.ietf-6man-predictable-fragment-id]) and the translator only >>> employs the low-order 16-bits of such value, it is very unlikely that >>> relying on the Fragment ID of the IPv6 atomic fragment will result in >>> a reduced Fragment ID collision rate (when compared to the case where >>> the translator selects each IPv4 Fragment ID on its own). >> OT: >> This is very well true! On Linux still we use per-host increasing >> randomized IDs, but at least since the paper "Counting Packets Sent >> Between Arbitrary Internet Hosts" by Jeffrey Knockel and Jedidiah >> Crandall showed up, we also seed in a bit of randomness. > > We had sent a report to some Linux folks regarding issues with > predictable Frag IDs arounf 2010 or 2011. At the time, it was changed > from a global counter to a per-dest counter (initialized to a random > value, IIRC). > > Has anything changed since then? e.g., what do you mean by "seed in a > bit of randomness). > > >> Also multiple >> IP addresses now share one IP-state "bucket". > > That's so that the per-destination counter is less deterministic, or what? > > > >> I still think that for generating fragmentation ids using just an >> increasing counter and encrypting it with a very small block cipher >> (e.g. RC5) is the way to go, but very slow. > > Take a look at the hash-based approach in > [I-D.ietf-6man-predictable-fragment-id]. You probably get the same > thing... but faster... > > >>> 5. Updating RFC2460 >>> >>> The following text from Section 5 of [RFC2460]: >>> >>> "In response to an IPv6 packet that is sent to an IPv4 destination >>> (i.e., a packet that undergoes translation from IPv6 to IPv4), the >>> originating IPv6 node may receive an ICMP Packet Too Big message >>> reporting a Next-Hop MTU less than 1280. In that case, the IPv6 >>> node is not required to reduce the size of subsequent packets to >>> less than 1280, but must include a Fragment header in those >>> packets so that the IPv6-to-IPv4 translating router can obtain a >>> suitable Identification value to use in resulting IPv4 fragments. >>> Note that this means the payload may have to be reduced to 1232 >>> octets (1280 minus 40 for the IPv6 header and 8 for the Fragment >>> header), and smaller still if additional extension headers are >>> used." >>> >>> is formally replaced with: >>> >>> "An IPv6 node that receives an ICMPv6 Packet Too Big error message >>> that reports a Next-Hop MTU smaller than 1280 bytes (the minimum >>> IPv6 MTU) MUST NOT include a Fragment header in subsequent packets >>> sent to the corresponding destination. That is, IPv6 nodes MUST >>> NOT generate IPv6 atomic fragments." >> This is the same as ignoring the packet? Should we still notify any >> errors without updating path MTUs? > > The original advice was to just drop the ICMPv6 PTB. However, it was > later noted that still notifying the errors (without updating the Path > MTU) would be better. -- And I'd say I'd agree. e.g., ythat could result > in a more specific error message if eventually e.g. the TCP connection > times out. > > >> I am not sure because user space might have cared about IPv6< 1280 >> errors before and they very well might be listening for them. > > Any ideas what they might be using those ICMPv6 PTB for? -- The only > consumer for ICMPv6 PTBs<1280 is SIIT... so one would expect that any > other app would just drop those PTBs if received.... > > >> So in an operating system we just don't update the "destination cache" >> anymore but we don't treat it as an illegal ICMP error? > > Exactly. > > > >>> Appendix A. Small Survey of OSes that Fail to Produce IPv6 Atomic >>> Fragments >>> >>> [This section will probably be removed from this document before it >>> is published as an RFC]. >>> >>> This section includes a non-exhaustive list of operating systems that >>> *fail* to produce IPv6 atomic fragments. It is based on the results >>> published in [RFC6946] and [Morbitzer]. >>> >>> The following Operating Systems fail to generate IPv6 atomic >>> fragments in response to ICMPv6 PTB messages that report an MTU >>> smaller than 1280 bytes: >>> >>> o FreeBSD 8.0 >>> >>> o Linux kernel 2.6.32 >>> >>> o Linux kernel 3.2 >>> >> I am a bit unsure but hadn't yet time to test this. We definitely have >> the logic to generate atomic fragments in those mentioned linux >> versions. > > Since there are tools to do that > (<http://www.si6networks.com/tools/ipv6toolkit>), I'll try to check that > for TCP, UDP, and ICMPv6. > > Thanks! > > Best regards, -- Regards, RayH
- Review of draft-gont-6man-deprecate-atomfrag-gene… Hannes Frederic Sowa
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Hannes Frederic Sowa
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Fernando Gont
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Fernando Gont
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Hannes Frederic Sowa
- Re: Re: Review of draft-gont-6man-deprecate-atomf… Ray Hunter
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Hosnieh Rafiee
- RE: Review of draft-gont-6man-deprecate-atomfrag-… Hosnieh Rafiee
- Re: Review of draft-gont-6man-deprecate-atomfrag-… Hannes Frederic Sowa