[要約] RFC 5722は、IPv6フラグメントの重複処理に関するガイドラインです。その目的は、ネットワークデバイスが重複したフラグメントを適切に処理するための方法を提供することです。

Network Working Group                                        S. Krishnan
Request for Comments: 5722                                      Ericsson
Updates: 2460                                              December 2009
Category: Standards Track
        

Handling of Overlapping IPv6 Fragments

重複するIPv6フラグメントの処理

Abstract

概要

The fragmentation and reassembly algorithm specified in the base IPv6 specification allows fragments to overlap. This document demonstrates the security issues associated with allowing overlapping fragments and updates the IPv6 specification to explicitly forbid overlapping fragments.

ベースIPv6仕様で指定されている断片化と再組み立てアルゴリズムにより、フラグメントが重複します。このドキュメントは、オーバーラップフラグメントを許可することに関連するセキュリティの問題を示し、IPv6仕様を更新して、オーバーラップフラグメントを明示的に禁止します。

Status of This Memo

本文書の位置付け

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

このドキュメントは、インターネットコミュニティのインターネット標準トラックプロトコルを指定し、改善のための議論と提案を要求します。このプロトコルの標準化状態とステータスについては、「インターネット公式プロトコル標準」(STD 1)の現在のエディションを参照してください。このメモの配布は無制限です。

Copyright Notice

著作権表示

Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved.

Copyright(c)2009 IETF Trustおよび文書著者として特定された人。全著作権所有。

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 BSD License.

このドキュメントは、BCP 78およびIETFドキュメント(http://trustee.ietf.org/license-info)に関連するIETF Trustの法的規定の対象となります。この文書に関するあなたの権利と制限を説明するので、これらの文書を注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、セクション4.Eで説明されている法的規定のセクション4.Eで説明されており、BSDライセンスに記載されているように保証なしで提供される簡略化されたBSDライセンステキストを含める必要があります。

Table of Contents

目次

   1. Introduction ....................................................2
      1.1. Conventions Used in This Document ..........................2
   2. Overlapping Fragments ...........................................2
   3. The Attack ......................................................3
   4. Node Behavior ...................................................5
   5. Security Considerations .........................................5
   6. Acknowledgements ................................................5
   7. References ......................................................6
      7.1. Normative References .......................................6
      7.2. Informative References .....................................6
        
1. Introduction
1. はじめに

Fragmentation is used in IPv6 when the IPv6 packet will not fit inside the path MTU to its destination. When fragmentation is performed, an IPv6 node uses a fragment header, as specified in Section 4.5 of the IPv6 base specification [RFC2460], to break down the datagram into smaller fragments that will fit in the path MTU. The destination node receives these fragments and reassembles them. The algorithm specified for fragmentation in [RFC2460] does not prevent the fragments from overlapping, and this can lead to some security issues with firewalls [RFC4942]. This document explores the issues that can be caused by overlapping fragments and updates the IPv6 specification to explicitly forbid overlapping fragments.

IPv6パケットがパスMTU内に宛先に収まらない場合、IPv6でフラグメンテーションが使用されます。断片化が実行されると、IPv6ノードは、IPv6ベース仕様[RFC2460]のセクション4.5で指定されているように、フラグメントヘッダーを使用して、データグラムをパスMTUに収まる小さなフラグメントに分解します。宛先ノードはこれらのフラグメントを受信し、それらを再組み立てします。[RFC2460]の断片化に指定されたアルゴリズムは、フラグメントの重複を防ぐことはなく、ファイアウォールのセキュリティ問題につながる可能性があります[RFC4942]。このドキュメントでは、フラグメントの重複によって引き起こされる可能性のある問題を調査し、IPv6仕様を更新して、オーバーラップフラグメントを明示的に禁止します。

1.1. Conventions Used in This Document
1.1. このドキュメントで使用されている規則

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

「必須」、「そうしない」、「必須」、「必要」、「しない」、「そうしない」、「そうではない」、「そうでない」、「推奨」、「5月」、および「オプション」は、[RFC2119]に記載されているように解釈される。

2. Overlapping Fragments
2. オーバーラップフラグメント

Commonly used firewalls use the algorithm specified in [RFC1858] to weed out malicious packets that try to overwrite parts of the transport-layer header in order to bypass inbound connection checks. [RFC1858] prevents an overlapping fragment attack on an upper-layer protocol (in this case, TCP) by recommending that packets with a fragment offset of 1 be dropped. While this works well for IPv4 fragments, it will not work for IPv6 fragments. This is because the fragmentable part of the IPv6 packet can contain extension headers before the TCP header, making this check less effective.

一般的に使用されるファイアウォールは、[RFC1858]で指定されたアルゴリズムを使用して、インバウンド接続チェックをバイパスするために輸送層ヘッダーの一部を上書きしようとする悪意のあるパケットを排除します。[RFC1858]は、1のフラグメントオフセットを持つパケットがドロップされることを推奨することにより、上層層プロトコル(この場合はTCP)に対するオーバーラップフラグメント攻撃を防ぎます。これはIPv4フラグメントではうまく機能しますが、IPv6フラグメントでは機能しません。これは、IPv6パケットの断片的な部分がTCPヘッダーの前に拡張ヘッダーを含めることができ、このチェックが効果を低下させるためです。

3. The Attack
3. 攻撃

This attack describes how a malicious node can bypass a firewall using overlapping fragments. Consider a sufficiently large IPv6 packet that needs to be fragmented.

この攻撃では、悪意のあるノードがオーバーラップフラグメントを使用してファイアウォールをバイパスする方法を説明しています。断片化する必要がある十分に大きなIPv6パケットを検討してください。

   +------------------+--------------------//-----------------------+
   |  Unfragmentable  |                 Fragmentable                |
   |       Part       |                     Part                    |
   +------------------+--------------------//-----------------------+
        

Figure 1: Large IPv6 Packet

図1:大きなIPv6パケット

This packet is split into several fragments by the sender so that the packet can fit inside the path MTU. Let's say the packet is split into two fragments.

このパケットは、送信者によっていくつかのフラグメントに分割され、パケットがPATH MTU内に収まるようにします。パケットが2つのフラグメントに分割されているとしましょう。

   +------------------+--------+--------------------+
   |  Unfragmentable  |Fragment|       first        |
   |       Part       | Header |      fragment      |
   +------------------+--------+--------------------+
        
   +------------------+--------+--------------------+
   |  Unfragmentable  |Fragment|       second       |
   |       Part       | Header |      fragment      |
   +------------------+--------+--------------------+
        

Figure 2: Fragmented IPv6 Packet

図2:断片化されたIPv6パケット

Consider the first fragment. Let's say it contains a destination options header (DOH) 80 octets long and is followed by a TCP header.

最初のフラグメントを考えてください。宛先オプションヘッダー(DOH)80オクテットの長さが含まれており、その後にTCPヘッダーが続くとしましょう。

 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<==FH
 |NextHdr=DOH(60)|   Reserved    |   FragmentOffset = 0    |Res|1|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Identification=aaaabbbb                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<==DOH
 |NextHdr=TCP(6) | HdrExtLen = 9 |                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
 |                                                               |
 .                                                               .
 .                            Options                            .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<==TCP
 |        Source Port            |       Destination Port        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Sequence Number                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Acknowledgment Number                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Offset| Reserved  |U|A|P|R|S|F|           Window              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Figure 3: First Fragment

図3:最初のフラグメント

The TCP header has the following values of the flags: S(YN)=1 and A(CK)=1. This may make an inspecting stateful firewall think that it is a response packet for a connection request initiated from the trusted side of the firewall. Hence, it will allow the fragment to pass. It will also allow the following fragments with the same Fragment Identification value in the fragment header to pass through.

TCPヘッダーには、フラグの次の値があります。S(yn)= 1およびa(ck)= 1。これにより、検査するステートフルファイアウォールは、ファイアウォールの信頼できる側から開始された接続要求の応答パケットであると考えることができます。したがって、フラグメントを通過させることができます。また、フラグメントヘッダーに同じフラグメント識別値を持つ次のフラグメントが通過することもできます。

A malicious node can form a second fragment with a TCP header that changes the flags and sets S(YN)=1 and A(CK)=0. This can change the packet on the receiving end to consider the packet as a connection request instead of a response. By doing this, the malicious node has bypassed the firewall's access control to initiate a connection request to a node protected by a firewall.

悪意のあるノードは、フラグを変更し、s(yn)= 1とa(ck)= 0を設定するTCPヘッダーを使用して2番目のフラグメントを形成できます。これにより、受信側のパケットを変更して、パケットを応答の代わりに接続要求として考慮することができます。これを行うことにより、悪意のあるノードはファイアウォールのアクセス制御をバイパスして、ファイアウォールによって保護されたノードへの接続要求を開始しました。

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<==FH
|NextHdr=DOH(60)|   Reserved    |   FragmentOffset = 10   |Res|0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Identification=aaaabbbb                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<==TCP
|        Source Port            |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Sequence Number                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Acknowledgment Number                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Offset| Reserved  |U|A|P|R|S|F|           Window              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Figure 4: Second Fragment

図4:2番目のフラグメント

Note that this attack is much more serious in IPv6 than in IPv4. In IPv4, the overlapping part of the TCP header does not include the source and destination ports. In IPv6, the attack can easily work to replace the source or destination port with an overlapping fragment.

この攻撃は、IPv4よりもIPv6の方がはるかに深刻であることに注意してください。IPv4では、TCPヘッダーの重複部分にはソースポートと宛先ポートが含まれていません。IPv6では、攻撃は簡単に機能して、ソースまたは宛先ポートを重複するフラグメントに置き換えることができます。

4. Node Behavior
4. ノード動作

IPv6 nodes transmitting datagrams that need to be fragmented MUST NOT create overlapping fragments. When reassembling an IPv6 datagram, if one or more its constituent fragments is determined to be an overlapping fragment, the entire datagram (and any constituent fragments, including those not yet received) MUST be silently discarded.

IPv6ノードは、断片化する必要があるデータグラムを送信して、重複するフラグメントを作成してはなりません。IPv6データグラムを再組み立てする場合、その1つ以上の構成要素フラグメントが重複するフラグメントであると判断された場合、データグラム全体(およびまだ受け取っていないものを含む構成断片)は静かに捨てなければなりません。

Nodes MAY also provide mechanisms to track the reception of such packets, for instance, by implementing counters or alarms relating to these events.

ノードは、これらのイベントに関連するカウンターまたはアラームを実装することにより、そのようなパケットの受信を追跡するメカニズムを提供する場合があります。

5. Security Considerations
5. セキュリティに関する考慮事項

This document discusses an attack that can be used to bypass IPv6 firewalls using overlapping fragments. It recommends disallowing overlapping fragments in order to prevent this attack.

このドキュメントでは、オーバーラップフラグメントを使用してIPv6ファイアウォールをバイパスするために使用できる攻撃について説明します。この攻撃を防ぐために、重複する断片を軽視することをお勧めします。

6. Acknowledgements
6. 謝辞

The author would like to thank Thomas Narten, Doug Montgomery, Gabriel Montenegro, Remi Denis-Courmont, Marla Azinger, Arnaud Ebalard, Seiichi Kawamura, Behcet Sarikaya, Vishwas Manral, Christian Vogt, Bob Hinden, Carl Wallace, Jari Arkko, Pasi Eronen, Francis Dupont, Neville Brownlee, Dan Romascanu, Lars Eggert, Cullen Jennings, and Alfred Hoenes for their reviews and suggestions that made this document better.

著者は、トーマス・ナルテン、ダグ・モンゴメリー、ガブリエル・モンテネグロ、レミ・デニス・コールモント、マーラ・アジンガー、アルノー・エバラード、川川聖人、ヴィシュワス・マンラル、クリスチャン・ヴォーグ、ボブ・ヒンデン、カール・ウォレス、ジャリ・アルク、パシFrancis Dupont、Neville Brownlee、Dan Romascanu、Lars Eggert、Cullen Jennings、Alfred Hoenesのレビューと提案については、この文書を改善しました。

7. References
7. 参考文献
7.1. Normative References
7.1. 引用文献

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するためのキーワード」、BCP 14、RFC 2119、1997年3月。

[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.

[RFC2460] Deering、S。およびR. Hinden、「Internet Protocol、Version 6(IPv6)仕様」、RFC 2460、1998年12月。

7.2. Informative References
7.2. 参考引用

[RFC1858] Ziemba, G., Reed, D., and P. Traina, "Security Considerations for IP Fragment Filtering", RFC 1858, October 1995.

[RFC1858] Ziemba、G.、Reed、D。、およびP. Traina、「IPフラグメントフィルタリングのセキュリティ上の考慮事項」、RFC 1858、1995年10月。

[RFC4942] Davies, E., Krishnan, S., and P. Savola, "IPv6 Transition/Co-existence Security Considerations", RFC 4942, September 2007.

[RFC4942] Davies、E.、Krishnan、S。、およびP. Savola、「IPv6 Transition/Co-Existence Security Cansationations」、RFC 4942、2007年9月。

Author's Address

著者の連絡先

Suresh Krishnan Ericsson 8400 Blvd Decarie Town of Mount Royal, Quebec Canada

Suresh Krishnan Ericsson 8400 Blvd Decarie Town of Mount Royal、Quebec Canada

   EMail: suresh.krishnan@ericsson.com