Re: [v6ops] [ipv6-wg] Extension Headers / Impact on Security Devices

"Fred Baker (fred)" <fred@cisco.com> Wed, 17 June 2015 07:41 UTC

Return-Path: <fred@cisco.com>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6815E1A1B7B for <v6ops@ietfa.amsl.com>; Wed, 17 Jun 2015 00:41:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -116.511
X-Spam-Level:
X-Spam-Status: No, score=-116.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, GB_I_INVITATION=-2, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_WHITELIST=-100] 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 VgrIaio36rcH for <v6ops@ietfa.amsl.com>; Wed, 17 Jun 2015 00:41:39 -0700 (PDT)
Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 742591A1BA7 for <v6ops@ietf.org>; Wed, 17 Jun 2015 00:41:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7858; q=dns/txt; s=iport; t=1434526895; x=1435736495; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=ryfnfIL64UANv5r/gTCnWerMD52HhIYjLoqUtYadvOU=; b=euSIwZUhAntQdBArgSKYLF/iwQaWvmvJDXCiVMTrCgwVIaou2TUNxPfP dcwD5SKz01Wg6maoE9ihxy5Ml1cG3hNOplRsHLO3bQ15fqRgvJ8NW3ulP +apVTX4Fn/Ynm/DN/jrQHRXZoIuzKkj2OLaQPAtV8NzTKFiJW+DNQUxry 0=;
X-Files: signature.asc : 487
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AOBQAhJIFV/5ldJa1bgxBUXwa/bwyFdgKBTjsRAQEBAQEBAYEKhCIBAQECAQEBAQFGHwYLBQsCAQgOBAYnBycLFAMOAgQOBQ4OiAsIDc1EAQEBAQEBAQEBAQEBAQEBAQEBAQEBF4pCgQKEIxEBUQcJgw6BFAWREYJXAYIhgU2BRoFzhB+BNIcTh1uHfiaCCxyBUm+BDDqBAgEBAQ
X-IronPort-AV: E=Sophos;i="5.13,631,1427760000"; d="asc'?scan'208";a="160077116"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by alln-iport-3.cisco.com with ESMTP; 17 Jun 2015 07:41:34 +0000
Received: from xhc-rcd-x07.cisco.com (xhc-rcd-x07.cisco.com [173.37.183.81]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t5H7fYhZ015863 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 17 Jun 2015 07:41:34 GMT
Received: from xmb-rcd-x09.cisco.com ([169.254.9.178]) by xhc-rcd-x07.cisco.com ([173.37.183.81]) with mapi id 14.03.0195.001; Wed, 17 Jun 2015 02:41:34 -0500
From: "Fred Baker (fred)" <fred@cisco.com>
To: Enno Rey <erey@ernw.de>
Thread-Topic: [v6ops] [ipv6-wg] Extension Headers / Impact on Security Devices
Thread-Index: AQHQqNEIg5ZU+gtmFE6PqXTscgbWoA==
Date: Wed, 17 Jun 2015 07:41:33 +0000
Message-ID: <C07DF957-9A2D-4962-ABAA-DE61F5C5D533@cisco.com>
References: <20150515105406.GA3028@ernw.de> <87siav2m6p.fsf@stepladder-it.com> <F1D4404E5E6C614EB9D3083F4D15A7E7C4A92C@hex02> <20150517191841.GA26929@ernw.de>
In-Reply-To: <20150517191841.GA26929@ernw.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.19.64.123]
Content-Type: multipart/signed; boundary="Apple-Mail=_5F3E814B-42A6-485B-AD3E-62527ECCCDA2"; protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/v6ops/RwjnphvTHOhgcJc9LWEEwoqZFWs>
Cc: "v6ops@ietf.org" <v6ops@ietf.org>, "ipv6-wg@ripe.net" <ipv6-wg@ripe.net>
Subject: Re: [v6ops] [ipv6-wg] Extension Headers / Impact on Security Devices
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/v6ops/>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Jun 2015 07:41:41 -0000

I'm of course missing the preceding email. No problem with the cross-posting, but let's get the question on the table? Is this section 4.1's statement that "it is recommended that those headers appear in the following order"?

I have a hunch that an internet draft requiring headers to be in the listed order would be looked at with approbation. The issue, if any, would likely have regard to repeated Destination Option headers. However

   Each extension header should occur at most once, except for the
   Destination Options header which should occur at most twice (once
   before a Routing header and once before the upper-layer header).

seems to me fairly definitive.

Fernando would like to see a specification of how long the entire list of extension headers may be, in terms of "how large of a hardware buffer has to be implemented in a switch?" That has a couple of issues related to "why does one have to ask the question?" The hardware should definitely be large enough to read in the IPv6 header, the HBH Header, and the Routing Header. After that, the only host that SHOULD need to read it all in is the host itself, and the host can do its processing from RAM. There is one "gotcha" case, which is when someone uses an ACL (disallowing Fragmentation Headers, perhaps, or looking for the TCP port, meaning one has to ask whether a given packet is TCP and what its port number is). The firewall is going to have to chase down the chain of extension headers.

How big is a HBH header? How big is a routing option such as the Segment Routing option? If that's a list of 27 services, each with a 16 byte IPv6 address...

> On May 17, 2015, at 12:18 PM, Enno Rey <erey@ernw.de> wrote:
> 
> Hi Silvia,
> 
> On Sun, May 17, 2015 at 06:43:11PM +0000, Silvia Hagen wrote:
>> Hi
>> 
>> I keep stumbling about that "recommendational wording" in RFC 2460 everytime I teach it.
>> 
>> Couldn't we update RFC2460 and make this list a strict order?
> 
> good luck bringing this suggestion to IETF 6man... ;-)
> 
> 
> 
>> 
>> I would want my firewall to notify me if the EHs in a packet do not follow the list.
> 
> actually when we tested a number of commercial firewalls in late 2013 (results here: https://www.ernw.de/download/TR14_IPv6SecSummit_AAtlasis-RISC-project_results.pdf) it turned out that pretty much all of them follow a (from our perspective "reasonable approach", that is dropping "unusal combinations or number of ext_hdrs" by default. (which, of course, violates RFC 2460. but apparently all major vendors follow a line of reasoning similar to ours).
> so, in short, firewalls "are not affected".
> 
> 
>> And limiting the number of possible EHs per packet might be a good idea.
> 
> yes, that _would actually be_ a good idea.
> 
> 
> I'm cross-posting this to v6ops as there's a related discussion going on right now. pls forgive this potential Usenet etiquette violation.
> 
> best
> 
> Enno
> 
> 
> 
> 
>> 
>> Silvia
>> 
>> -----Urspr?ngliche Nachricht-----
>> Von: ipv6-wg [mailto:ipv6-wg-bounces@ripe.net] Im Auftrag von Benedikt Stockebrand
>> Gesendet: Sonntag, 17. Mai 2015 18:39
>> An: ipv6-wg@ripe.net
>> Betreff: Re: [ipv6-wg] Extension Headers / Impact on Security Devices
>> 
>> Hi Enno and list,
>> 
>> Enno Rey <erey@ernw.de> writes:
>> 
>>> hope everybody had a great #RIPE70 meeting. We did!
>>> Many thanks to the organizers and chairs!
>> 
>> and thanks to the actual speakers as well the speakers we had to turn down due to time constraints, too:-)
>> 
>>> If the chairs consider this appropriate we will happily give a
>>> presentation on this stuff in Bucharest or at another occasion.
>> 
>> Sounds good to me!
>> 
>>> - looking at the "liberty" RFC2460 provides as for ext_hdrs (wrt to
>>> their number, order[...]
>> 
>> Actually, as far as I'm concerned that's the real core of the problem.
>> Or more specifically, the first two lines of RFC 2460, section 4.1:
>> 
>>   When more than one extension header is used in the same packet, it is
>>   recommended that those headers appear in the following order:
>> 
>> followed on the next page by
>> 
>>   Each extension header should occur at most once, except for the
>>   Destination Options header which should occur at most twice (once
>>   before a Routing header and once before the upper-layer header).
>> 
>> Note in particular that these are not even RFC 2119 "SHOULD" or "RECOMMENDED" and such.
>> 
>> The impact here is actually at least twofold:
>> 
>> - It is impossible to implement this as a simple pipeline architecture
>>  in hardware; at least for cases deviating from the "recommendations"
>>  above this effectively becomes either excessively complex to implement
>>  in hardware or an invitation to DoS when implemented in software on an
>>  otherwise hardware router.
>> 
>> - As I understand it, at least some of the issues you have found are
>>  effectively based on violating the second paragraph quoted, making it
>>  impossible to come up with a lower bound on how long the header chain
>>  can actually get and therefore leading to the fragmentation related
>>  attacks and similar you have discovered.
>> 
>> The original idea was that the extension headers are processed strictly in the order they occur, so one question to ask is if there is any valid reason to violate these "recommendations" for other than malicious purposes.
>> 
>> 
>> Cheers,
>> 
>>    Benedikt
>> 
>> --
>> Benedikt Stockebrand,                   Stepladder IT Training+Consulting
>> Dipl.-Inform.                           http://www.stepladder-it.com/
>> 
>>          Business Grade IPv6 --- Consulting, Training, Projects
>> 
>> BIVBlog---Benedikt's IT Video Blog: http://www.stepladder-it.com/bivblog/
>> 
>> 
> 
> --
> Enno Rey
> 
> ERNW GmbH - Carl-Bosch-Str. 4 - 69115 Heidelberg - www.ernw.de
> Tel. +49 6221 480390 - Fax 6221 419008 - Cell +49 173 6745902
> 
> Handelsregister Mannheim: HRB 337135
> Geschaeftsfuehrer: Enno Rey
> 
> =======================================================
> Blog: www.insinuator.net || Conference: www.troopers.de
> Twitter: @Enno_Insinuator
> =======================================================
> 
> _______________________________________________
> v6ops mailing list
> v6ops@ietf.org
> https://www.ietf.org/mailman/listinfo/v6ops