Network Working Group G. Nakibly Internet-Draft National EW Research & Intended status: Informational Simulation Center Expires:July 28,August 8, 2011 F. Templin Boeing Research & TechnologyJanuary 24,February 04, 2011 Routing Loop Attack using IPv6 Automatic Tunnels: Problem Statement and Proposed Mitigationsdraft-ietf-v6ops-tunnel-loops-02.txtdraft-ietf-v6ops-tunnel-loops-03.txt Abstract This document is concerned with security vulnerabilities in IPv6-in- IPv4 automatic tunnels. These vulnerabilities allow an attacker to take advantage of inconsistencies between the IPv4 routing state and the IPv6 routing state. The attack forms a routing loop which can be abused as a vehicle for traffic amplification to facilitate DoS attacks. The first aim of this document is to inform on this attack and its root causes. The second aim is to present some possible mitigation measures. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onJuly 28,August 8, 2011. Copyright Notice Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. A Detailed Description of the Attack . . . . . . . . . . . . . 4 3. Proposed Mitigation Measures . . . . . . . . . . . . . . . . . 6 3.1.Destination and Source Address ChecksVerification of end point existence . . . . . . . . . . . 6 3.1.1.Known IPv6 PrefixNeighbor Cache Check . . . . . . . . . . . . . . .8 3.2. Verification of end point existence. . 6 3.1.2. Known IPv4 Address Check . . . . . . . . .8 3.2.1. Neighbor Cache Check. . . . . . 7 3.2. Operational Measures . . . . . . . . . . .8 3.2.2. Known IPv4 Address Check. . . . . . . . 7 3.2.1. Avoiding a Shared IPv4 Link . . . . . . .9 3.3. Operational Measures. . . . . . 8 3.2.2. A Single Border Router . . . . . . . . . . . . .9 3.3.1. Avoiding a Shared IPv4 Link. . . 8 3.2.3. A Comprehensive List of Tunnel Routers . . . . . . . . 9 3.3. Destination and Source Address Checks . . . . . . . . .10 3.3.2. A Single Border Router. 9 3.3.1. Known IPv6 Prefix Check . . . . . . . . . . . . . . .1011 4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 11 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . .1112 6. Security Considerations . . . . . . . . . . . . . . . . . . .1112 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 8.1. Normative References . . . . . . . . . . . . . . . . . . . 12 8.2. Informative References . . . . . . . . . . . . . . . . . .1213 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13 1. Introduction IPv6-in-IPv4 tunnels are an essential part of many migration plans for IPv6. They allow two IPv6 nodes to communicate over an IPv4-only network. Automatic tunnels that use stateless address mapping (hereafter called "automatic tunnels") are a category of tunnels in which a tunneled packet's egress IPv4 address is embedded within the destination IPv6 address of the packet. An automatic tunnel's router is a router that respectively encapsulates and decapsulates the IPv6 packets into and out of the tunnel. Ref. [USENIX09] pointed out the existence of a vulnerability in the design of IPv6 automatic tunnels. Tunnel routers operate on the implicit assumption that the destination address of an incoming IPv6 packet is always an address of a valid node that can be reached via the tunnel. The assumption of path validity poses a denial of service risk as inconsistency between the IPv4 routing state and the IPv6 routing state allows a routing loop to be formed. An attacker can exploit this vulnerability by crafting a packet which is routed over a tunnel to a node that is not participating in that tunnel. This node may forward the packet out of the tunnel to the native IPv6 network. There the packet is routed back to the ingress point that forwards it back into the tunnel. Consequently, the packet loops in and out of the tunnel. The loop terminates only when the Hop Limit field in the IPv6 header of the packet is decremented to zero. This vulnerability can be abused as a vehicle for traffic amplification to facilitate DoS attacks [RFC4732]. Without compensating security measures in place, all IPv6 automatic tunnels that are based on protocol-41 encapsulation [RFC4213] are vulnerable to such an attack including ISATAP [RFC5214], 6to4 [RFC3056] and 6rd[RFC5569].[RFC5969]. It should be noted that this document does not consider non-protocol-41 encapsulation attacks. In particular, we do not address the Teredo [RFC4380] attacks described in [USENIX09]. These attacks are considered in [I-D.gont-6man-teredo-loops]. The aim of this document is to shed light on the routing loop attack and describe possible mitigation measures that should be considered by operators of current IPv6 automatic tunnels and by designers of future ones. We note that tunnels may be deployed in various operational environments, e.g. service provider network, enterprise network, etc. Specific issues related to the attack which are derived from the operational environment are not considered in this document. 2. A Detailed Description of the Attack In this section we shall denote an IPv6 address of a node reached via a given tunnel by the prefix of the tunnel and an IPv4 address of the tunnel end point, i.e., Addr(Prefix, IPv4). Note that the IPv4 address may or may not be part of the prefix (depending on the specification of the tunnel's protocol). The IPv6 address may be dependent on additional bits in the interface ID, however for our discussion their exact value is not important. The two victims of this attack are routers - R1 and R2 - of two different tunnels - T1 and T2. Both routers have the capability to forward IPv6 packets in and out of their respective tunnels. The two tunnels need not be based on the same tunnel protocol. The only condition is that the two tunnel protocols be based on protocol-41 encapsulation. The IPv4 address of R1 is IP1, while the prefix of its tunnel is Prf1. IP2 and Prf2 are the respective values for R2. We assume that IP1 and IP2 belong to the same address realm, i.e., they are either both public, or both private and belong to the same internal network. The following network diagram depicts the locations of the two routers. ####### # R1 # ####### // \ T1 // \ interface // \ _______________//_ __\________________ | | | | | IPv4 Network | | IPv6 Network | |__________________| |___________________| \\ / \\ / T2 \\ / interface \\ / ####### # R2 # ####### Figure 1: The network setting of the attack The attack is depicted in Figure 2. It is initiated by sending an IPv6 packet (packet 0 in Figure 2) destined to a fictitious end point that appears to be reached via T2 and has IP1 as its IPv4 address, i.e., Addr(Prf2, IP1). The source address of the packet is a T1 address with Prf1 as the prefix and IP2 as the embedded IPv4 address, i.e., Addr(Prf1, IP2). As the prefix of the destination address is Prf2, the packet will be routed over the IPv6 network to T2. We assume that R2 is the packet's entry point to T2. R2 receives the packet through its IPv6 interface and forwards it over its T2 interface encapsulated with an IPv4 header having a destination address derived from the IPv6 destination, i.e., IP1. The source address is the address of R2, i.e., IP2. The packet (packet 1 in Figure 2.) is routed over the IPv4 network to R1, which receives the packet on its IPv4 interface. It processes the packet as a packet that originates from one of the end nodes of T1. Since the IPv4 source address corresponds to the IPv6 source address, R1 will decapsulate the packet. Since the packet's IPv6 destination is outside of T1, R1 will forward the packet onto a native IPv6 interface. The forwarded packet (packet 2 in Figure 2) is identical to the original attack packet. Hence, it is routed back to R2, in which the loop starts again. Note that the packet may not necessarily be transported from R1 over native IPv6 network. R1 may be connected to the IPv6 network through another tunnel. R1 R2 | | 0 | 1 |<------ |<===============| | 2 | |--------------->| | . | | . | 1 - IPv4: IP2 --> IP1 IPv6: Addr(Prf1,IP2) --> Addr(Prf2,IP1) 0,2- IPv6: Addr(Prf1,IP2) --> Addr(Prf2,IP1) Legend: ====> - tunneled IPv6, ---> - native IPv6 Figure 2: Routing loop attack between two tunnels' routers The crux of the attack is as follows. The attacker exploits the fact that R2 does not know that R1 does not take part of T2 and that R1 does not know that R2 does not take part of T1. The IPv4 network acts as a shared link layer for the two tunnels. Hence, the packet is repeatedly forwarded by both routers. It is noted that the attack will fail when the IPv4 network can not transport packets between the tunnels. For example, when the two routers belong to different IPv4 address realms or when ingress/egress filtering is exercised between the routes. The loop will stop when the Hop Limit field of the packet reaches zero. After a single loop the Hop Limit field is decreased by the number of IPv6 routers on path from R1 and R2. Therefore, the number of loops is inversely proportional to the number of IPv6 hops between R1 and R2. The tunnel pair T1 and T2 may be any combination of automatic tunnel types, e.g., ISATAP, 6to4 and 6rd. This has the exception that both tunnels can not be of type 6to4, since two 6to4 routers can not belong to different tunnels (there is only one 6to4 tunnel in the Internet). For example, if the attack were to be launched on an ISATAP router (R1) and 6to4 relay (R2), then the destination and source addresses of the attack packet would be 2002:IP1:* and Prf1:: 0200:5EFE:IP2, respectively. 3. Proposed Mitigation Measures This section presents some possible mitigation measures for the attack described above. For each measure we shall discuss its advantages and disadvantages. The proposed measures fall under the following three categories: oDestination and source addresses checks oVerification of end point existence o Operational measures3.1.o Destination andSource Address Checks Tunnel routers can use a source address check mitigation when they forward an IPv6 packet into a tunnel interface with an IPv6sourceaddress that embeds oneaddresses checks 3.1. Verification of end point existence The routing loop attack relies on therouter's configured IPv4 addresses. Similarly, tunnel routers can usefact that adestination address check mitigation when they receiverouter does not know whether there is anIPv6 packet on aend point that can reached via its tunnelinterface with an IPv6that has the source or destination addressthat embeds oneof therouter's configured IPv4 addresses. These checks should correspondpacket. This category includes mitigation measures which aim toboth tunnels' IPv6 address formats, regardless ofverify that there is a node which participate in thetype oftunnel and its address corresponds to the packet's destination or source addresses, as appropriate. 3.1.1. Neighbor Cache Check One way that the routeremploys. For example, if tunnel router R1 (of anycan verify that an end host exists and can be reached via the tunnelprotocol) forwards a packet intois by checking whether a valid entry exists for it in the neighbor cache of the corresponding tunnelinterface withinterface. The neighbor cache entry can be populated through, e.g., anIPv6 source address that matches the 6to4 prefix 2002:IP1::/48,initial reachability check, receipt of neighbor discovery messages, administrative configuration, etc. When the routerdiscards the packet if IP1 is one of its own IPv4 addresses. Inhas asecond example, if tunnel router R2 receives an IPv6packetonto send to a potential tunnelinterface with an IPv6 destination address with an off-link prefix but withhost for which there is no neighbor cache entry, it can perform aninterface identifier that matches the ISATAP address suffix ::0200: 5EFE:IP2,initial reachability check on therouter discardspacket's destination address, e.g., as specified in thepacket if IP2 is onesecond paragraph ofits own IPv4 addresses. Hence a tunnelSection 8.4 of [RFC5214]. (The router canavoid the attack by performing the following checks: o When the router forwards an IPv6 packet intosimilarly perform atunnel interface, it discards the packet if"reverse reachability" check on theIPv6packet's source addresshas an off-link prefix but embeds one of the router's configured IPv4 addresses. o When the routerwhen it receivesan IPv6a packetonfrom a potential tunnelinterface, it discards the packet ifhost for which there is no neighbor cache entry.) This reachability check parallels theIPv6 destinationaddresshas an off- link prefix but embeds one of the router's configured IPv4 addresses. This approach has the advantage that that no ancillary state is required, since checking is through static lookupresolution specifications in Section 7.2 of [RFC4861], i.e., thelistsrouter maintains a small queue ofIPv4 and IPv6 addresses belongingpackets waiting for reachability confirmation to complete. If confirmation succeeds, the router discovers that a legitimate tunnel host responds to therouter. However,address. Otherwise, the router discards subseqent packets and returns ICMP destination unreachable indications as specified in Section 7.2.2 of [RFC4861]. Note that this approachhas some inherent limitations o The checks incur an overheadassumes that the neighbor cache will remain coherent and not subject to malicious attack, whichis proportionalmust be confirmed based on specific deployment scenarios. One possible way for an attacker to subvert thenumber of IPv4 addresses assignedneighbor cache is tothe router. Ifsend false neighbor discovery messages with a spoofed source address. 3.1.2. Known IPv4 Address Check Another approach that enables a routeris assigned many addresses, the additional processing overhead for each packet may be considerable. Noteto verify that anunmitigated attack packet wouldend host exists and can berepetitively processedreached via the tunnel is simply by pre-configuring the routeruntilwith theHop Limit expires, which may require as many as 255 iterations. Hence, an unmitigated attack will consume far more aggregate processing overhead than per-packet address checks even ifset of IPv4 addresses that are authorized to use the tunnel. Upon this configuration the routerassigns a large number of addresses.can perform the following simple checks: oThe checks should be performed forWhen the router forwards an IPv6address formats of every existing automatic IPv6 tunnel protocol (which uses protocol-41 encapsulation). Hence, the checks must be updated as new protocols are defined. o Before the checks can be performed the format ofpacket into the tunnel interface with a destination addressmust be recognized. There is no guaranteethatthis can be generally done. For example, one can not determine ifmatches anIPv6on-link prefix and that embeds the IPv4 addressis a 6rd one, henceIP1, it discards therouter would needpacket if IP1 does not belong tobethe configuredwith alist ofall applicable 6rd prefixes (which may be prohibitively large) in order to unambiguously apply the checks.IPv4 addresses. oThe checks cannot be performed ifWhen theembedded IPv4router receives an IPv6 packet on the tunnel's interface with a source addressisthat matches aprivate one [RFC1918] since it is ambiguous in scope. Namely,on-link prefix and that embeds theprivateIPv4 addressmay be legitimately allocated to another node in another routing region. The last limitation may be relieved if the router has some information that allowsIP2, it discards the packet if IP2 does not belong tounambiguously determinethescopeconfigured list ofthe address.IPv4 addresses. 3.2. Operational Measures Thecheck in thefollowingsubsection is one example for this. 3.1.1. Known IPv6 Prefix Check A router maymeasures can beconfigured withtaken by thefull list of IPv6 subnet prefixes assignednetwork operator. Their aim is to configure thetunnels attached to its current IPv4 routing region. Innetwork in such acase it can useway that thelist to determine when static destination and source address checks are possible. By keeping track of the list of IPv6 prefixes assigned to the tunnels in the IPv4 routing region, a routerattacks canperformnot take place. 3.2.1. Avoiding a Shared IPv4 Link As noted above, thefollowing checksattack relies on having anaddress which embeds a privateIPv4address: o Whennetwork as a shared link-layer between more than one tunnel. From this the following two mitigation measures arise: 3.2.1.1. Filtering IPv4 Protocol-41 Packets In this measure a tunnel routerforwardsmay drop all IPv4 protocol-41 packets received or sent over interfaces that are attached to anIPv6 packet into its tunnel withuntrusted IPv4 network. This will cut-off any IPv4 network as asource address that embedsshared link. This measure has the advantage of simplicity. However, such aprivatemeasure may not always be suitable for scenarios where IPv4address and matches an IPv6 prefix in the prefix list, it determines whetherconnectivity is essential on all interfaces. 3.2.1.2. Operational Avoidance of Multiple Tunnels This measure mitigates thepacket should be discarded or forwardedattack byperforming the source address check specifiedsimply allowing for a single IPv6 tunnel to operate inSection 3.1. Otherwise,a bounded IPv4 network. For example, the attack can not take place in broadband home networks. In such cases there is a small home network having a single residential gateway which serves as a tunnel router. A tunnel routerforwardsis vulnerable to thepacket. o Whenattack only if it has at least two interfaces with a path to therouter receives an IPv6 packet on itsInternet: a tunnel interfacewith a destination address that embedsand aprivate IPv4 address and matches annative IPv6prefixinterface (as depicted in Figure 1). However, a residential gateway usually has only a single interface to theprefix list, it determines whetherInternet, therefore thepacket should be discardedattack can not take place. Moreover, if there are only one orforwarded by performinga few tunnel routers in thedestination address check specifiedIPv4 network and all participate inSection 3.1. Otherwise,therouter forwardssame tunnel then there is no opportunity for perpetuating thepacket. The disadvantage of thisloop. This approachishas theadministrative overhead for maintainingadvantage that it avoids thelist of IPv6 subnet prefixes associated with an IPv4 routing regionattack profile altogether without need for explicit mitigations. However, it requires careful configuration management which maybecome unwieldy should that listnot belongtenable in large and/orfrequently updated. 3.2. Verification of end point existence The routing loop attack relies on the factunbounded IPv4 networks. 3.2.2. A Single Border Router It is reasonable to assume that a tunnel routerdoes not know whether there is an end point that can reached viashall accept or forward tunneled packets only over its tunnelthat has the source or destination address of the packet. This category includes mitigation measures which aiminterface. It is also reasonable toverifyassume thatthere isanode which participate in thetunnelandrouter shall accept or forward IPv6 packets only over itsaddress corresponds toIPv6 interface. If these two interfaces are physically different then thepacket's destination or source addresses, as appropriate. 3.2.1. Neighbor Cache Check One waynetwork operator can mitigate the attack by ensuring that therouter can verifyfollowing condition holds: there is no path between these two interfaces thatan end host exists and can be reached viadoes not go through the tunnel router. The above condition ensures that an encapsulated packet which isby checking whether a valid entry exists for it intransmitted over theneighbor cachetunnel interface will not get to another tunnel router and from there to the IPv6 interface of thecorresponding tunnel interface.first router. Theneighbor cache entry can be populated through, e.g.,condition also ensures the reverse direction, i.e., aninitial reachability check, receipt of neighbor discovery messages, administrative configuration, etc. WhenIPv6 packet which is transmitted over the IPv6 interface will not get to another tunnel routerhas a packetand from there tosendthe tunnel interface of the first router. This condition is essentially translated to apotential tunnel host forscenario in whichtherethe tunnel router isno neighbor cache entry, it can perform an initial reachability check onthepacket's destination address, e.g., as specified inonly border router between thesecond paragraph of Section 8.4IPv6 network and the IPv4 network to which it is attached (as in broadband home network scenario mentioned above). 3.2.3. A Comprehensive List of[RFC5214]. (TheTunnel Routers If a tunnel router cansimilarly performbe configured with a"reverse reachability" check oncomprehensive list of IPv4 addresses of all other tunnel routers in thepacket's source address when it receivesnetwork, then the router can use the list as apacketfilter to discard any tunneled packets coming from other routers. For example, apotentialtunnelhost for whichrouter can use the network's ISATAP Potential Router List (PRL) [RFC5214] as a filter as long as there isno neighbor cache entry.)operational assurance that all ISATAP routers are listed and that no other types of tunnel routers are present in the network. Thisreachability checkmeasure parallels theaddress resolution specificationsone proposed for 6rd inSection 7.2 of [RFC4861], i.e.,[RFC5969] where therouter maintains a small queue6rd BR filters all known relay addresses ofpackets waiting for reachability confirmation to complete. If confirmation succeeds, the router discovers that a legitimate tunnel host responds to the address. Otherwise,other tunnels inside therouter discards subseqent packets and returns ICMP destination unreachable indicationsISP's network. This measure is especially useful for intra-site tunneling mechanisms, such asspecified in Section 7.2.2 of [RFC4861]. Note that this approach assumes that the neighbor cache will remain coherentISATAP andnot subject to malicious attack, which must6rd, since filtering can beconfirmed basedexercised onspecific deployment scenarios. One possible way for an attacker to subvert the neighbor cache is to send false neighbor discovery messages with a spoofed source address. 3.2.2. Known IPv4well-defined site borders. 3.3. Destination and Source AddressCheck Another approach that enablesChecks Tunnel routers can use arouter to verify thatsource address check mitigation when they forward anend host exists and can be reached via theIPv6 packet into a tunnelis simply by pre-configuring the routerinterface withthe set of IPv4 addressesan IPv6 source address thatare authorized to use the tunnel. Upon this configurationembeds one of therouterrouter's configured IPv4 addresses. Similarly, tunnel routers canperform the following simple checks: o When the router forwardsuse a destination address check mitigation when they receive an IPv6 packetinto theon a tunnel interface withaan IPv6 destination address thatmatches an on-link prefix and thatembeds one of the router's configured IPv4 addresses. These checks should correspond to both tunnels' IPv6 addressIP1, itformats, regardless of the type of tunnel the router employs. For example, if tunnel router R1 (of any tunnel protocol) forwards a packet into a tunnel interface with an IPv6 source address that matches the 6to4 prefix 2002:IP1::/48, the router discards the packet if IP1does not belong to the configured listis one of its own IPv4 addresses.o When theIn a second example, if tunnel router R2 receives an IPv6 packet onthe tunnel'sa tunnel interface witha sourcean IPv6 destination addressthat matches a on-linkwith an off-link prefixandbut with an interface identifier thatembedsmatches theIPv4ISATAP addressIP2, itsuffix ::0200: 5EFE:IP2, the router discards the packet if IP2does not belong to the configured listis one of its own IPv4 addresses.3.3. Operational Measures The following measuresHence a tunnel router canbe takenavoid the attack by performing thenetwork operator. Their aim is to configurefollowing checks: o When thenetwork in suchrouter forwards an IPv6 packet into away thattunnel interface, it discards theattacks can not take place. 3.3.1. Avoiding a Shared IPv4 Link As noted above,packet if theattack relies on havingIPv6 source address has anIPv4 network as a shared link-layer between more thanoff-link prefix but embeds onetunnel. From thisof thefollowing two mitigation measures arise: 3.3.1.1. Filteringrouter's configured IPv4Protocol-41 Packets In this measure a tunneladdresses. o When the routermay drop all IPv4 protocol-41 packets received or sent over interfaces that are attached toreceives anuntrusted IPv4 network. This will cut-off any IPv4 network asIPv6 packet on ashared link. This measure has the advantagetunnel interface, it discards the packet if the IPv6 destination address has an off- link prefix but embeds one ofsimplicity. However, such a measure may not always be suitable for scenarios wherethe router's configured IPv4connectivity is essential on all interfaces. 3.3.1.2. Operational Avoidance of Multiple Tunnelsaddresses. Thismeasure mitigatesapproach has theattack by simply allowing for a single IPv6 tunnel to operateadvantage that that no ancillary state is required, since checking is through static lookup ina boundedthe lists of IPv4network. For example,and IPv6 addresses belonging to theattack can not take place in broadband home networks. In such cases there is a small home network having a single residential gatewayrouter. However, this approach has some inherent limitations o The checks incur an overhead whichserves as a tunnelis proportional to the number of IPv4 addresses assigned to the router.A tunnelIf a router isvulnerable toassigned many addresses, the additional processing overhead for each packet may be considerable. Note that an unmitigated attackonlypacket would be repetitively processed by the router until the Hop Limit expires, which may require as many as 255 iterations. Hence, an unmitigated attack will consume far more aggregate processing overhead than per-packet address checks even ifit has at least two interfaces with a path totheInternet: a tunnel interface androuter assigns anativelarge number of addresses. o The checks should be performed for the IPv6interface (as depicted in Figure 1). However, a residential gateway usually has only a single interface toaddress formats of every existing automatic IPv6 tunnel protocol (which uses protocol-41 encapsulation). Hence, theInternet, thereforechecks must be updated as new protocols are defined. o Before theattackchecks can be performed the format of the address must be recognized. There is no guarantee that this can be generally done. For example, one can nottake place. Moreover,determine ifthere are only one oran IPv6 address is afew tunnel routers6rd one, hence the router would need to be configured with a list of all applicable 6rd prefixes (which may be prohibitively large) in order to unambiguously apply the checks. o The checks cannot be performed if the embedded IPv4network and all participateaddress is a private one [RFC1918] since it is ambiguous in scope. Namely, thesame tunnel then there is no opportunity for perpetuatingprivate address may be legitimately allocated to another node in another routing region. The last limitation may be relieved if theloop. This approachrouter hasthe advantagesome information that allows itavoidsto unambiguously determine theattack profile altogether without needscope of the address. The check in the following subsection is one example forexplicit mitigations. However, it requires careful configuration management whichthis. 3.3.1. Known IPv6 Prefix Check A router maynotbetenable in large and/or unbounded IPv4 networks. 3.3.2. A Single Border Router It is reasonableconfigured with the full list of IPv6 subnet prefixes assigned toassume that a tunnel router shall accept or forward tunneled packets only over its tunnel interface. It is also reasonablethe tunnels attached toassume that a tunnel router shall accept or forward IPv6 packets only overitsIPv6 interface. If these two interfacescurrent IPv4 routing region. In such a case it can use the list to determine when static destination and source address checks arephysically different thenpossible. By keeping track of thenetwork operator can mitigatelist of IPv6 prefixes assigned to theattack by ensuring thattunnels in the IPv4 routing region, a router can perform the followingcondition holds: there is no path between these two interfaces that does not go throughchecks on an address which embeds a private IPv4 address: o When the router forwards an IPv6 packet into its tunnelrouter. The above condition ensureswith a source address that embeds a private IPv4 address and matches anencapsulatedIPv6 prefix in the prefix list, it determines whether the packetwhich is transmitted overshould be discarded or forwarded by performing thetunnel interface will not get to another tunnel router and from there tosource address check specified in Section 3.3. Otherwise, theIPv6 interface ofrouter forwards thefirst router. The condition also ensurespacket. o When thereverse direction, i.e.,router receives an IPv6 packetwhich is transmitted over the IPv6 interface will not get to anotheron its tunnelrouterinterface with a destination address that embeds a private IPv4 address andfrom there tomatches an IPv6 prefix in thetunnel interface ofprefix list, it determines whether thefirst router. This condition is essentially translated to a scenariopacket should be discarded or forwarded by performing the destination address check specified inwhichSection 3.3. Otherwise, thetunnelrouter forwards the packet. The disadvantage of this approach is theonly border router betweenadministrative overhead for maintaining the list of IPv6network and thesubnet prefixes associated with an IPv4network to which it is attached (as in broadband home network scenario mentioned above).routing region may become unwieldy should that list be long and/or frequently updated. 4. Recommendations In light of the mitigation measures proposed above we make the following recommendations in decreasing order: 1. When possible, it is recommended that the attacks are operationally eliminated (as per one of the measures proposed in Section3.3).3.2). 2. For tunnel routers that keep a coherent and trusted neighbor cache which includes all legitimate end-points of the tunnel, we recommend exercising the Neighbor Cache Check. 3. For tunnel routers that can implement the Neighbor Reachability Check, we recommend exercising it. 4. For tunnels having small and static list of end-points we recommend exercising Known IPv4 Address Check. 5.For all other cases weWe generally do not recommend using the Destination and Source AddressChecks. This is the least preferable measureChecks sinceit generallythey can not mitigate routing loops with 6rd routers. Therefore, these checks should not be used alone unless there is operational assurance that other measures are exercised to prevent routing loops with 6rd routers. As noted earlier, tunnels may be deployed in various operational environments. There is a possibility that other mitigations may be feasible in specific deployment scenarios. The above recommendations are general and do not attempt to cover such scenarios. 5. IANA Considerations This document has no IANA considerations. 6. Security Considerations This document aims at presenting possible solutions to the routing loop attack which involves automatic tunnels' routers. It contains various checks that aim to recognize and drop specific packets that have strong potential to cause a routing loop. These checks do not introduce new security threats. 7. Acknowledgments This work has benefited from discussions on the V6OPS, 6MAN and SECDIR mailing lists. Remi Despres, Christian Huitema, Dmitry Anipko, Dave Thaler and Fernando Gont are acknowledged for their contributions. 8. References 8.1. Normative References [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, February 1996. [RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains via IPv4 Clouds", RFC 3056, February 2001. [RFC4213] Nordmark, E. and R. Gilligan, "Basic Transition Mechanisms for IPv6 Hosts and Routers", RFC 4213, October 2005. [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007. [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214, March 2008.[RFC5569] Despres, R.,[RFC5969] Townsley, W. and O. Troan, "IPv6 Rapid Deployment on IPv4 Infrastructures(6rd)",(6rd) -- Protocol Specification", RFC5569, January5969, August 2010. 8.2. Informative References [I-D.gont-6man-teredo-loops] Gont, F., "Mitigating Teredo Rooting Loop Attacks", draft-gont-6man-teredo-loops-00 (work in progress), September 2010. [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs)", RFC 4380, February 2006. [RFC4732] Handley, M., Rescorla, E., and IAB, "Internet Denial-of- Service Considerations", RFC 4732, December 2006. [USENIX09] Nakibly, G. and M. Arov, "Routing Loop Attacks using IPv6 Tunnels", USENIX WOOT, August 2009. Authors' Addresses Gabi Nakibly National EW Research & Simulation Center P.O. Box 2250 (630) Haifa 31021 Israel Email: gnakibly@yahoo.com Fred L. Templin Boeing Research & Technology P.O. Box 3707 MC 7L-49 Seattle, WA 98124 USA Email: fltemplin@acm.org