Internet Engineering Task Force (IETF)                           F. Gont
Request for Comments: 6093                                       UTN/FRH
Updates: 793, 1011, 1122                                  A. Yourtchenko
Category: Standards Track                                          Cisco
ISSN: 2070-1721                                             January 2011
        
Internet Engineering Task Force (IETF)                           F. Gont
Request for Comments: 6093                                       UTN/FRH
Updates: 793, 1011, 1122                                  A. Yourtchenko
Category: Standards Track                                          Cisco
ISSN: 2070-1721                                             January 2011
        

On the Implementation of the TCP Urgent Mechanism

TCP紧急机制的实现

Abstract

摘要

This document analyzes how current TCP implementations process TCP urgent indications and how the behavior of some widely deployed middleboxes affects how end systems process urgent indications. This document updates the relevant specifications such that they accommodate current practice in processing TCP urgent indications, raises awareness about the reliability of TCP urgent indications in the Internet, and recommends against the use of urgent indications (but provides advice to applications that do).

本文档分析当前TCP实现如何处理TCP紧急指示,以及一些广泛部署的中间盒的行为如何影响终端系统如何处理紧急指示。本文件更新了相关规范,以适应当前处理TCP紧急指示的实践,提高了人们对互联网上TCP紧急指示可靠性的认识,并建议不要使用紧急指示(但向使用紧急指示的应用程序提供建议)。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6093.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc6093.

Copyright Notice

版权公告

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

版权所有(c)2011 IETF信托基金和确定为文件作者的人员。版权所有。

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.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................3
   2. Specification of the TCP Urgent Mechanism .......................3
      2.1. Semantics of Urgent Indications ............................3
      2.2. Semantics of the Urgent Pointer ............................4
      2.3. Allowed Length of "Urgent Data" ............................4
   3. Current Implementation Practice of the TCP Urgent Mechanism .....5
      3.1. Semantics of Urgent Indications ............................5
      3.2. Semantics of the Urgent Pointer ............................5
      3.3. Allowed Length of "Urgent Data" ............................6
      3.4. Interaction of Middleboxes with TCP Urgent Indications .....6
   4. Updating RFC 793, RFC 1011, and RFC 1122 ........................6
   5. Advice to New Applications Employing TCP ........................7
   6. Advice to Applications That Make Use of the Urgent Mechanism ....7
   7. Security Considerations .........................................7
   8. Acknowledgements ................................................8
   9. References ......................................................8
      9.1. Normative References .......................................8
      9.2. Informative References .....................................8
   Appendix A.  Survey of the Processing of TCP Urgent
                Indications by Some Popular TCP Implementations ......10
      A.1. FreeBSD ...................................................10
      A.2. Linux .....................................................10
      A.3. NetBSD ....................................................10
      A.4. OpenBSD ...................................................11
      A.5. Cisco IOS software ........................................11
      A.6. Microsoft Windows 2000, Service Pack 4 ....................11
      A.7. Microsoft Windows 2008 ....................................11
      A.8. Microsoft Windows 95 ......................................11
        
   1. Introduction ....................................................3
   2. Specification of the TCP Urgent Mechanism .......................3
      2.1. Semantics of Urgent Indications ............................3
      2.2. Semantics of the Urgent Pointer ............................4
      2.3. Allowed Length of "Urgent Data" ............................4
   3. Current Implementation Practice of the TCP Urgent Mechanism .....5
      3.1. Semantics of Urgent Indications ............................5
      3.2. Semantics of the Urgent Pointer ............................5
      3.3. Allowed Length of "Urgent Data" ............................6
      3.4. Interaction of Middleboxes with TCP Urgent Indications .....6
   4. Updating RFC 793, RFC 1011, and RFC 1122 ........................6
   5. Advice to New Applications Employing TCP ........................7
   6. Advice to Applications That Make Use of the Urgent Mechanism ....7
   7. Security Considerations .........................................7
   8. Acknowledgements ................................................8
   9. References ......................................................8
      9.1. Normative References .......................................8
      9.2. Informative References .....................................8
   Appendix A.  Survey of the Processing of TCP Urgent
                Indications by Some Popular TCP Implementations ......10
      A.1. FreeBSD ...................................................10
      A.2. Linux .....................................................10
      A.3. NetBSD ....................................................10
      A.4. OpenBSD ...................................................11
      A.5. Cisco IOS software ........................................11
      A.6. Microsoft Windows 2000, Service Pack 4 ....................11
      A.7. Microsoft Windows 2008 ....................................11
      A.8. Microsoft Windows 95 ......................................11
        
1. Introduction
1. 介绍

This document analyzes how some current TCP implementations process TCP urgent indications, and how the behavior of some widely deployed middleboxes affects the processing of urgent indications by hosts. This document updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 [RFC1122] such that they accommodate current practice in processing TCP urgent indications. It also provides advice to applications using the urgent mechanism and raises awareness about the reliability of TCP urgent indications in the current Internet.

本文分析了当前一些TCP实现如何处理TCP紧急指示,以及一些广泛部署的中间盒的行为如何影响主机处理紧急指示。本文件更新了RFC 793[RFC0793]、RFC 1011[RFC1011]和RFC 1122[RFC1122],以适应当前处理TCP紧急指示的实践。它还为使用紧急机制的应用程序提供建议,并提高对当前Internet中TCP紧急指示可靠性的认识。

Given the above issues and potential interoperability issues with respect to the currently common default mode operation, it is strongly recommended that applications do not employ urgent indications. Nevertheless, urgent indications are still retained as a mandatory part of the TCP protocol to support the few legacy applications that employ them. However, it is expected that even these applications will have difficulties in environments with middleboxes.

鉴于上述问题以及与当前通用默认模式操作相关的潜在互操作性问题,强烈建议应用程序不要采用紧急指示。尽管如此,紧急指示仍然作为TCP协议的强制性部分保留,以支持使用它们的少数遗留应用程序。但是,预计即使是这些应用程序在使用中间盒的环境中也会遇到困难。

Section 2 describes what the current IETF specifications state with respect to TCP urgent indications. Section 3 describes how current TCP implementations actually process TCP urgent indications. Section 4 updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 [RFC1122], such that they accommodate current practice in processing TCP urgent indications. Section 5 provides advice to new applications employing TCP, with respect to the TCP urgent mechanism. Section 6 provides advice to existing applications that use or rely on the TCP urgent mechanism.

第2节描述了当前IETF规范中关于TCP紧急指示的说明。第3节描述了当前TCP实现如何实际处理TCP紧急指示。第4节更新了RFC 793[RFC0793]、RFC 1011[RFC1011]和RFC 1122[RFC1122],以适应当前处理TCP紧急指示的实践。第5节就TCP紧急机制向使用TCP的新应用程序提供建议。第6节为使用或依赖TCP紧急机制的现有应用程序提供建议。

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 RFC 2119 [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。

2. Specification of the TCP Urgent Mechanism
2. TCP紧急机制规范
2.1. Semantics of Urgent Indications
2.1. 紧急指示语义学

TCP implements an "urgent mechanism" that allows the sending user to stimulate the receiving user to accept some "urgent data" and that permits the receiving TCP to indicate to the receiving user when all the currently known "urgent data" have been read.

TCP实现了一种“紧急机制”,允许发送用户刺激接收用户接受一些“紧急数据”,并允许接收TCP向接收用户指示当前已知的所有“紧急数据”何时已被读取。

The TCP urgent mechanism permits a point in the data stream to be designated as the end of urgent information. Whenever this point is in advance of the receive sequence number (RCV.NXT) at the receiving TCP, that TCP must tell the user to go into "urgent mode"; when the receive sequence number catches up to the urgent pointer, the TCP

TCP紧急机制允许将数据流中的一个点指定为紧急信息的结尾。每当该点位于接收TCP的接收序列号(RCV.NXT)之前时,该TCP必须告诉用户进入“紧急模式”;当接收序列号赶上紧急指针时,TCP

must tell user to go into "normal mode" [RFC0793]. This means, for example, that data that was received as "normal data" might become "urgent data" if an urgent indication is received in some successive TCP segment before that data is consumed by the TCP user.

必须告诉用户进入“正常模式”[RFC0793]。这意味着,例如,如果在TCP用户消费数据之前在某个连续TCP段中接收到紧急指示,则作为“正常数据”接收的数据可能成为“紧急数据”。

The URG control flag indicates that the "Urgent Pointer" field is meaningful and must be added to the segment sequence number to yield the urgent pointer. The absence of this flag indicates that there is no "urgent data" outstanding [RFC0793].

URG控制标志表示“紧急指针”字段有意义,必须添加到段序列号以生成紧急指针。没有此标志表示没有未处理的“紧急数据”[RFC0793]。

The TCP urgent mechanism is NOT a mechanism for sending "out-of-band" data: the so-called "urgent data" should be delivered "in-line" to the TCP user.

TCP紧急机制不是发送“带外”数据的机制:所谓的“紧急数据”应该“在线”发送给TCP用户。

2.2. Semantics of the Urgent Pointer
2.2. 紧急指针的语义

There is some ambiguity in RFC 793 [RFC0793] with respect to the semantics of the Urgent Pointer. Section 3.1 (page 17) of RFC 793 [RFC0793] states that the Urgent Pointer "communicates the current value of the urgent pointer as a positive offset from the sequence number in this segment. The urgent pointer points to the sequence number of the octet following the urgent data. This field is only be interpreted in segments with the URG control bit set" (sic). However, Section 3.9 (page 56) of RFC 793 [RFC0793] states, when describing the processing of the SEND call in the ESTABLISHED and CLOSE-WAIT states, that "If the urgent flag is set, then SND.UP <- SND.NXT-1 and set the urgent pointer in the outgoing segments".

关于紧急指针的语义,RFC 793[RFC0793]中存在一些歧义。RFC 793[RFC0793]第3.1节(第17页)规定紧急指针'将紧急指针的当前值作为与此段中序列号的正偏移量进行通信。紧急指针指向紧急数据后面的八位字节序列号。该字段仅在URG控制位设置为“(sic)的段中解释。然而,RFC 793[RFC0793]第3.9节(第56页)规定,在描述已建立和关闭等待状态下发送呼叫的处理时,“如果设置了紧急标志,则SND.UP<-SND.NXT-1并在传出段中设置紧急指针”。

RFC 1011 [RFC1011] clarified this ambiguity in RFC 793 stating that "Page 17 is wrong. The urgent pointer points to the last octet of urgent data (not to the first octet of non-urgent data)". RFC 1122 [RFC1122] formally updated RFC 793 by stating, in Section 4.2.2.4 (page 84), that "the urgent pointer points to the sequence number of the LAST octet (not LAST+1) in a sequence of urgent data".

RFC 1011[RFC1011]在RFC 793中澄清了这种歧义,指出“第17页是错误的。紧急指针指向紧急数据的最后一个八位字节(而不是非紧急数据的第一个八位字节)”。RFC 1122[RFC1122]正式更新了RFC 793,在第4.2.2.4节(第84页)中指出,“紧急指针指向紧急数据序列中最后一个八位字节(不是最后一个+1)的序列号”。

2.3. Allowed Length of "Urgent Data"
2.3. “紧急数据”的允许长度

RFC 793 [RFC0793] allows TCP peers to send "urgent data" of any length, as the TCP urgent mechanism simply provides a pointer to an interesting point in the data stream. In this respect, Section 4.2.2.4 (page 84) of RFC 1122 [RFC1122] explicitly states that "A TCP MUST support a sequence of urgent data of any length".

RFC 793[RFC0793]允许TCP对等方发送任意长度的“紧急数据”,因为TCP紧急机制只提供指向数据流中感兴趣点的指针。在这方面,RFC 1122[RFC1122]第4.2.2.4节(第84页)明确规定“TCP必须支持任意长度的紧急数据序列”。

3. Current Implementation Practice of the TCP Urgent Mechanism
3. TCP紧急机制的当前实现实践
3.1. Semantics of Urgent Indications
3.1. 紧急指示语义学

As discussed in Section 2, the TCP urgent mechanism simply permits a point in the data stream to be designated as the end of urgent information but does NOT provide a mechanism for sending "out-of-band" data.

如第2节所述,TCP紧急机制仅允许将数据流中的一个点指定为紧急信息的结尾,但不提供发送“带外”数据的机制。

Unfortunately, virtually all TCP implementations process TCP urgent indications differently. By default, the last byte of "urgent data" is delivered "out of band" to the application. That is, it is not delivered as part of the normal data stream [UNPv1]. For example, the "out-of-band" byte is read by an application when a recv(2) system call with the MSG_OOB flag set is issued.

不幸的是,几乎所有的TCP实现都以不同的方式处理TCP紧急指示。默认情况下,“紧急数据”的最后一个字节“带外”传递给应用程序。也就是说,它不是作为正常数据流[UNPv1]的一部分交付的。例如,当发出设置了MSG_OOB标志的recv(2)系统调用时,应用程序将读取“带外”字节。

Most implementations provide a socket option (SO_OOBINLINE) that allows an application to override the (broken) default processing of urgent indications, so that "urgent data" is delivered "in line" to the application, thus providing the semantics intended by the IETF specifications.

大多数实现都提供了一个套接字选项(SO_OOBINLINE),允许应用程序覆盖紧急指示的(中断的)默认处理,以便“紧急数据”以“直线”方式传递给应用程序,从而提供IETF规范所期望的语义。

3.2. Semantics of the Urgent Pointer
3.2. 紧急指针的语义

All the popular implementations that the authors of this document have been able to test interpret the semantics of the TCP Urgent Pointer as specified in Section 3.1 of RFC 793. This means that even when RFC 1122 formally updated RFC 793 to clarify the ambiguity in the semantics of the Urgent Pointer, this clarification was never reflected in actual implementations (i.e., virtually all implementations default to the semantics of the urgent pointer specified in Section 3.1 of RFC 793).

本文档作者能够测试的所有流行实现都解释了RFC 793第3.1节中指定的TCP紧急指针的语义。这意味着,即使RFC 1122正式更新RFC 793以澄清紧急指针语义中的模糊性,这种澄清也从未在实际实现中反映出来(即,几乎所有实现都默认为RFC 793第3.1节中指定的紧急指针语义)。

Some operating systems provide a system-wide toggle to override this behavior and interpret the semantics of the Urgent Pointer as clarified in RFC 1122. However, this system-wide toggle has been found to be inconsistent. For example, Linux provides the sysctl "tcp_stdurg" (i.e., net.ipv4.tcp_stdurg) that, when set, supposedly changes the system behavior to interpret the semantics of the TCP Urgent Pointer as specified in RFC 1122. However, this sysctl changes the semantics of the Urgent Pointer only for incoming segments (i.e., not for outgoing segments). This means that if this sysctl is set, an application might be unable to interoperate with itself if both the TCP sender and the TCP receiver are running on the same host.

一些操作系统提供了一个系统范围的切换来覆盖此行为,并解释紧急指针的语义,如RFC1122所述。但是,已发现此系统范围的切换不一致。例如,Linux提供了sysctl“tcp_stdurg”(即net.ipv4.tcp_stdurg),当设置它时,可能会更改系统行为以解释RFC 1122中指定的tcp紧急指针的语义。但是,此sysctl仅针对传入段(即,不针对传出段)更改紧急指针的语义。这意味着,如果设置了此sysctl,则如果TCP发送方和TCP接收方都在同一主机上运行,则应用程序可能无法与其自身进行互操作。

3.3. Allowed Length of "Urgent Data"
3.3. “紧急数据”的允许长度

While Section 4.2.2.4 (page 84) of RFC 1122 explicitly states that "A TCP MUST support a sequence of urgent data of any length", in practice, all those implementations that interpret TCP urgent indications as a mechanism for sending "out-of-band" data keep a buffer of a single byte for storing the "last byte of urgent data". Thus, if successive indications of "urgent data" are received before the application reads the pending "out-of-band" byte, that pending byte will be discarded (i.e., overwritten by the new byte of "urgent data").

尽管RFC 1122第4.2.2.4节(第84页)明确规定“TCP必须支持任意长度的紧急数据序列”,但在实践中,所有将TCP紧急指示解释为发送“带外”数据的机制的实现都保留一个单字节缓冲区,用于存储“紧急数据的最后一个字节”。因此,如果在应用程序读取挂起的“带外”字节之前接收到“紧急数据”的连续指示,则该挂起字节将被丢弃(即,被“紧急数据”的新字节覆盖)。

In order to avoid "urgent data" from being discarded, some implementations queue each of the received "urgent bytes", so that even if another urgent indication is received before the pending "urgent data" are consumed by the application, those bytes do not need to be discarded. Some of these implementations have been known to fail to enforce any limits on the amount of "urgent data" that they queue; thus, they become vulnerable to trivial resource exhaustion attacks [CPNI-TCP].

为了避免丢弃“紧急数据”,一些实现将接收到的每个“紧急字节”排队,以便即使在应用程序消费挂起的“紧急数据”之前接收到另一个紧急指示,也不需要丢弃这些字节。已知其中一些实现未能对其排队的“紧急数据”数量实施任何限制;因此,它们容易受到琐碎的资源耗尽攻击[CPNI-TCP]。

It should be reinforced that the aforementioned implementations are broken. The TCP urgent mechanism is not a mechanism for delivering "out-of-band" data.

应该强调的是,上述实现已被破坏。TCP紧急机制不是用于传递“带外”数据的机制。

3.4. Interaction of Middleboxes with TCP Urgent Indications
3.4. 中间盒与TCP紧急指示的交互

As a result of the publication of Network Intrusion Detection System (NIDS) evasion techniques based on TCP urgent indications [phrack], some middleboxes clear the urgent indications by clearing the URG flag and setting the Urgent Pointer to zero. This causes the "urgent data" to become "in line" (that is, accessible by the read(2) call or the recv(2) call without the MSG_OOB flag) in the case of those TCP implementations that interpret the TCP urgent mechanism as a facility for delivering "out-of-band" data (as described in Section 3.1). An example of such a middlebox is the Cisco PIX firewall [Cisco-PIX]. This should discourage applications from depending on urgent indications for their correct operation, as urgent indications may not be reliable in the current Internet.

由于基于TCP紧急指示[phrack]的网络入侵检测系统(NIDS)规避技术的发布,一些中间盒通过清除URG标志并将紧急指针设置为零来清除紧急指示。这会导致在将TCP紧急机制解释为传送“带外”数据(如第3.1节所述)的TCP实现中,“紧急数据”变为“在线”(即,通过read(2)调用或recv(2)调用访问,而无需MSG_OOB标志)。Cisco PIX防火墙[Cisco PIX]就是这种中间箱的一个例子。这应该阻止应用程序依赖紧急指示来正确操作,因为在当前的互联网上,紧急指示可能不可靠。

4. Updating RFC 793, RFC 1011, and RFC 1122
4. 更新RFC 793、RFC 1011和RFC 1122

Considering that as long as both the TCP sender and the TCP receiver implement the same semantics for the Urgent Pointer there is no functional difference in having the Urgent Pointer point to "the sequence number of the octet following the urgent data" vs. "the last octet of urgent data", and that all known implementations interpret the semantics of the Urgent Pointer as pointing to "the

考虑到只要TCP发送方和TCP接收方对紧急指针实现相同的语义,紧急指针指向“紧急数据后的八位字节序列号”与“紧急数据的最后一个八位字节”在功能上没有区别,所有已知的实现都将紧急指针的语义解释为指向“

sequence number of the octet following the urgent data", we hereby update RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 [RFC1122] such that "the urgent pointer points to the sequence number of the octet following the urgent data" (in segments with the URG control bit set), thus accommodating virtually all existing TCP implementations.

“紧急数据后的八位字节序列号”,我们在此更新RFC 793[RFC0793]、RFC 1011[RFC1011]和RFC 1122[RFC1122],以便“紧急指针指向紧急数据后的八位字节序列号”(在带有URG控制位集的段中),从而适应几乎所有现有的TCP实现。

5. Advice to New Applications Employing TCP
5. 对使用TCP的新应用程序的建议

As a result of the issues discussed in Section 3.2 and Section 3.4, new applications SHOULD NOT employ the TCP urgent mechanism. However, TCP implementations MUST still include support for the urgent mechanism such that existing applications can still use it.

由于第3.2节和第3.4节中讨论的问题,新应用程序不应使用TCP紧急机制。但是,TCP实现必须仍然包括对紧急机制的支持,以便现有应用程序仍然可以使用它。

6. Advice to Applications That Make Use of the Urgent Mechanism
6. 向使用紧急机制的应用程序提供建议

Even though applications SHOULD NOT employ the urgent mechanism, applications that still decide to employ it MUST set the SO_OOBINLINE socket option, such that "urgent data" is delivered in line, as intended by the IETF specifications.

尽管应用程序不应采用紧急机制,但仍决定采用紧急机制的应用程序必须设置SO_OOBINLINE套接字选项,以便按照IETF规范的预期顺序交付“紧急数据”。

Additionally, applications that still decide to use the urgent mechanism need to be designed for correct operation even when the URG flag is cleared by middleboxes.

此外,即使中间盒清除了URG标志,仍然决定使用紧急机制的应用程序也需要设计为能够正确运行。

7. Security Considerations
7. 安全考虑

Multiple factors can affect the data flow that is actually delivered to an application when the TCP urgent mechanism is employed: for example, the two possible interpretations of the semantics of the Urgent Pointer in current implementations (e.g., depending on the value of the tcp_stdurg sysctl), the possible implementation of the urgent mechanism as an "out-of-band" (OOB) facility (versus "in-band" as intended by the IETF specifications), or middleboxes (such as packet scrubbers) or the end-systems themselves that could cause the "urgent data" to be processed "in line". This might make it difficult for a Network Intrusion Detection System (NIDS) to track the application-layer data transferred to the destination system and thus lead to false negatives or false positives in the NIDS [CPNI-TCP] [phrack].

当采用TCP紧急机制时,多个因素可能会影响实际交付给应用程序的数据流:例如,当前实现中紧急指针语义的两种可能解释(例如,取决于TCP_stdurg sysctl的值),紧急机制的可能实现为“带外”(OOB)设施(与IETF规范中的“带内”设施相比),或可能导致“紧急数据”被“在线”处理的中间盒(如数据包洗涤器)或终端系统本身。这可能使网络入侵检测系统(NIDS)难以跟踪传输到目标系统的应用层数据,从而导致NIDS[CPNI-TCP][phrack]中出现误报或误报。

Probably the best way to avoid the security implications of TCP "urgent data" is to avoid having applications use the TCP urgent mechanism altogether. Packet scrubbers could probably be configured to clear the URG bit and set the Urgent Pointer to zero. This would basically cause the "urgent data" to be put "in line". However, this

避免TCP“紧急数据”的安全影响的最好方法可能是避免应用程序完全使用TCP紧急机制。数据包洗涤器可能被配置为清除URG位并将紧急指针设置为零。这基本上会导致“紧急数据”被“对齐”。但是,

might cause interoperability problems or undesired behavior in those applications that rely on the TCP urgent mechanism, such as Telnet [RFC0854] and FTP [RFC0959].

在依赖TCP紧急机制的应用程序(如Telnet[RFC0854]和FTP[RFC0959])中,可能会导致互操作性问题或不期望的行为。

8. Acknowledgements
8. 致谢

The authors of this document would like to thank (in alphabetical order) Jari Arkko, Ron Bonica, David Borman, Dave Cridland, Ralph Droms, Wesley Eddy, John Heffner, Alfred Hoenes, Alexey Melnikov, Keith Moore, Carlos Pignataro, Tim Polk, Anantha Ramaiah, Joe Touch, Michael Welzl, Dan Wing, and Alexander Zimmermann for providing valuable feedback on earlier versions of this document.

本文件的作者要感谢(按字母顺序)贾里·阿尔科、罗恩·博尼卡、大卫·鲍曼、戴夫·克里德兰、拉尔夫·德罗姆斯、韦斯利·埃迪、约翰·赫夫纳、阿尔弗雷德·霍恩斯、阿列克西·梅尔尼科夫、基思·摩尔、卡洛斯·皮格纳塔罗、蒂姆·波尔克、阿南塔·拉迈亚、乔·图奇、迈克尔·韦尔兹尔、丹·荣格、,以及Alexander Zimmermann为本文档的早期版本提供了有价值的反馈。

Fernando would like to thank David Borman and Joe Touch for a fruitful discussion about the TCP urgent mechanism at IETF 73 (Minneapolis).

费尔南多感谢David Borman和Joe Touch在IETF 73(明尼阿波利斯)上就TCP紧急机制进行了富有成效的讨论。

Fernando Gont's attendance to IETF meetings was supported by ISOC's "Fellowship to the IETF" program.

费尔南多·冈特出席IETF会议得到了ISOC“IETF奖学金”计划的支持。

Finally, Fernando Gont wishes to express deep and heartfelt gratitude to Jorge Oscar Gont and Nelida Garcia for their precious motivation and guidance.

最后,费尔南多·冈特谨向豪尔赫·奥斯卡·冈特和内丽达·加西亚表示衷心的感谢,感谢他们的宝贵动机和指导。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.

[RFC0793]Postel,J.,“传输控制协议”,标准7,RFC 793,1981年9月。

[RFC1011] Reynolds, J. and J. Postel, "Official Internet protocols", RFC 1011, May 1987.

[RFC1011]Reynolds,J.和J.Postel,“官方互联网协议”,RFC1011,1987年5月。

[RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - Communication Layers", STD 3, RFC 1122, October 1989.

[RFC1122]Braden,R.,Ed.“互联网主机的要求-通信层”,STD 3,RFC 1122,1989年10月。

[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月。

9.2. Informative References
9.2. 资料性引用

[CPNI-TCP] Gont, F., "Security Assessment of the Transmission Control Protocol (TCP)", "http://www.cpni.gov.uk/ Docs/tn-03-09-security-assessment-TCP.pdf", 2009.

[CPNI-TCP]Gont,F.,“传输控制协议(TCP)的安全评估”,“http://www.cpni.gov.uk/ 文件/tn-03-09-security-assessment-TCP.pdf”,2009年。

[Cisco-PIX] Cisco PIX, "http://www.cisco.com/en/US/docs/security/ asa/asa70/command/reference/tz.html#wp1288756".

[Cisco PIX]Cisco PIX,”http://www.cisco.com/en/US/docs/security/ asa/asa70/command/reference/tz.html#wp1288756”。

[FreeBSD] The FreeBSD project, "http://www.freebsd.org".

[FreeBSD]FreeBSD项目http://www.freebsd.org".

[Linux] The Linux Project, "http://www.kernel.org".

[Linux]Linux项目,”http://www.kernel.org".

[NetBSD] The NetBSD project, "http://www.netbsd.org".

[NetBSD]NetBSD项目,“http://www.netbsd.org".

[OpenBSD] The OpenBSD project, "http://www.openbsd.org".

[OpenBSD]OpenBSD项目http://www.openbsd.org".

[RFC0854] Postel, J. and J. Reynolds, "Telnet Protocol Specification", STD 8, RFC 854, May 1983.

[RFC0854]Postel,J.和J.Reynolds,“Telnet协议规范”,STD 8,RFC 854,1983年5月。

[RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9, RFC 959, October 1985.

[RFC0959]Postel,J.和J.Reynolds,“文件传输协议”,标准9,RFC 959,1985年10月。

[UNPv1] Stevens, W., "UNIX Network Programming, Volume 1. Networking APIs: Sockets and XTI", Prentice Hall PTR, 1997.

[UNPv1]Stevens,W,“UNIX网络编程,第1卷。网络API:套接字和XTI”,Prentice Hall PTR,1997年。

[Windows2000] Microsoft Windows 2000, "http://technet.microsoft.com/ en-us/library/bb726981(printer).aspx".

[Windows2000]Microsoft Windows 2000,“http://technet.microsoft.com/ en us/library/bb726981(打印机).aspx”。

[Windows95] Microsoft Windows 95, "ftp://ftp.demon.co.uk/pub/ mirrors/win95netfaq/faq-c.html".

[Windows95]Microsoft Windows 95,“ftp://ftp.demon.co.uk/pub/ 镜像/win95netfaq/faq-c.html”。

[phrack] Ko, Y., Ko, S., and M. Ko, "NIDS Evasion Method named "SeolMa"", Phrack Magazine, Volume 0x0b, Issue 0x39, Phile #0x03 of 0x12 http://www.phrack.org/ issues.html?issue=57&id=3#article, 2001.

[phrack]Ko,Y.,Ko,S.,和M.Ko,“名为“SeolMa”的NIDS规避方法”,phrack杂志,第0x0b卷,第0x39期,Phile#0x03/0x12http://www.phrack.org/ issues.html?issue=57&id=3#文章,2001年。

Appendix A. Survey of the Processing of TCP Urgent Indications by Some Popular TCP Implementations

附录A.一些流行TCP实现对TCP紧急指示处理的调查

A.1. FreeBSD
A.1. FreeBSD

FreeBSD 8.0 [FreeBSD] interprets the semantics of the urgent pointer as specified in Section 4 of this document. It does not provide any sysctl to override this behavior.

FreeBSD 8.0[FreeBSD]解释本文档第4节中指定的紧急指针的语义。它不提供任何sysctl来覆盖此行为。

FreeBSD provides the SO_OOBINLINE socket option that, when set, causes TCP "urgent data" to remain "in line". That is, it will be accessible by the read(2) call or the recv(2) call without the MSG_OOB flag.

FreeBSD提供SO_OOBINLINE套接字选项,当设置该选项时,会使TCP“紧急数据”保持“在线”。也就是说,它可以通过read(2)调用或recv(2)调用访问,而不需要MSG_OOB标志。

FreeBSD supports only one byte of "urgent data". That is, only the byte preceding the Urgent Pointer is considered "urgent data".

FreeBSD只支持一个字节的“紧急数据”。也就是说,只有紧急指针前面的字节才被视为“紧急数据”。

A.2. Linux
A.2. Linux

Linux 2.6.15-53-386 [Linux] interprets the semantics of the urgent pointer as specified in Section 4 of this document. It provides the net.ipv4.tcp_stdurg sysctl to override this behavior to interpret the Urgent Pointer as specified in RFC 1122 [RFC1122]. However, this sysctl only affects the processing of incoming segments (the Urgent Pointer in outgoing segments will still be set as specified in Section 4 of this document).

Linux 2.6.15-53-386[Linux]解释了本文档第4节中指定的紧急指针的语义。它提供net.ipv4.tcpstdurgsysctl来重写此行为,以解释RFC 1122[RFC1122]中指定的紧急指针。但是,此sysctl仅影响传入段的处理(传出段中的紧急指针仍将按照本文档第4节的规定进行设置)。

Linux provides the SO_OOBINLINE socket option that, when set, causes TCP "urgent data" to remain "in line". That is, it will be accessible by the read(2) call or the recv(2) call without the MSG_OOB flag.

Linux提供了SO_OOBINLINE套接字选项,当设置该选项时,会使TCP“紧急数据”保持“在线”。也就是说,它可以通过read(2)调用或recv(2)调用访问,而不需要MSG_OOB标志。

Linux supports only one byte of "urgent data". That is, only the byte preceding the Urgent Pointer is considered "urgent data".

Linux只支持一个字节的“紧急数据”。也就是说,只有紧急指针前面的字节才被视为“紧急数据”。

A.3. NetBSD
A.3. NetBSD

NetBSD 5.0.1 [NetBSD] interprets the semantics of the urgent pointer as specified in Section 4 of this document. It does not provide any sysctl to override this behavior.

NetBSD 5.0.1[NetBSD]解释本文件第4节中规定的紧急指针的语义。它不提供任何sysctl来覆盖此行为。

NetBSD provides the SO_OOBINLINE socket option that, when set, causes TCP "urgent data" to remain "in line". That is, it will be accessible by the read(2) call or the recv(2) call without the MSG_OOB flag.

NetBSD提供了SO_OOBINLINE套接字选项,当设置该选项时,会使TCP“紧急数据”保持“在线”。也就是说,它可以通过read(2)调用或recv(2)调用访问,而不需要MSG_OOB标志。

NetBSD supports only one byte of "urgent data". That is, only the byte preceding the Urgent Pointer is considered "urgent data".

NetBSD只支持一个字节的“紧急数据”。也就是说,只有紧急指针前面的字节才被视为“紧急数据”。

A.4. OpenBSD
A.4. OpenBSD

OpenBSD 4.2 [OpenBSD] interprets the semantics of the urgent pointer as specified in Section 4 of this document. It does not provide any sysctl to override this behavior.

OpenBSD 4.2[OpenBSD]解释本文档第4节中指定的紧急指针的语义。它不提供任何sysctl来覆盖此行为。

OpenBSD provides the SO_OOBINLINE socket option that, when set, causes TCP "urgent data" to remain "in line". That is, it will be accessible by the read(2) or recv(2) calls without the MSG_OOB flag.

OpenBSD提供了SO_OOBINLINE套接字选项,当设置该选项时,会使TCP“紧急数据”保持“在线”。也就是说,它可以通过read(2)或recv(2)调用访问,而不需要MSG_OOB标志。

OpenBSD supports only one byte of "urgent data". That is, only the byte preceding the Urgent Pointer is considered "urgent data".

OpenBSD只支持一个字节的“紧急数据”。也就是说,只有紧急指针前面的字节才被视为“紧急数据”。

A.5. Cisco IOS software
A.5. 思科IOS软件

Cisco IOS Software Releases 12.2(18)SXF7, 12.4(15)T7 interpret the semantics of the urgent pointer as specified in Section 4 of this document.

Cisco IOS软件版本12.2(18)SXF7、12.4(15)T7解释了本文件第4节中规定的紧急指针的语义。

The behavior is consistent with having the SO_OOBINLINE socket option turned on, i.e., the data is processed "in line".

该行为与打开SO_OOBINLINE套接字选项一致,即数据是“在线”处理的。

A.6. Microsoft Windows 2000, Service Pack 4
A.6. Microsoft Windows 2000,Service Pack 4

Microsoft Windows 2000 [Windows2000] interprets the semantics of the urgent pointer as specified in Section 4 of this document. It provides the TcpUseRFC1122UrgentPointer system-wide variable to override this behavior, interpreting the Urgent Pointer as specified in RFC 1122 [RFC1122].

Microsoft Windows 2000[Windows2000]解释本文档第4节中指定的紧急指针的语义。它提供TcpUseRFC1122UrgentPointer系统范围变量来重写此行为,并按照RFC 1122[RFC1122]中的规定解释紧急指针。

Tests performed with a sample server application compiled using the cygwin environment has shown that the default behavior is to return the "urgent data" "in line".

使用使用cygwin环境编译的示例服务器应用程序执行的测试表明,默认行为是在第行返回“紧急数据”。

A.7. Microsoft Windows 2008
A.7. 微软视窗2008

Microsoft Windows 2008 interprets the semantics of the urgent pointer as specified in Section 4 of this document.

Microsoft Windows 2008解释本文档第4节中指定的紧急指针的语义。

A.8. Microsoft Windows 95
A.8. 微软视窗95

Microsoft Windows 95 interprets the semantics of the urgent pointer as specified in Section 4 of this document. It provides the BSDUrgent system-wide variable to override this behavior, interpreting the Urgent Pointer as specified in RFC 1122 [RFC1122]. Windows 95 supports only one byte of "urgent data". That is, only the byte preceding the Urgent Pointer is considered "urgent data" [Windows95].

Microsoft Windows 95解释本文档第4节中指定的紧急指针的语义。它提供BSDUrgent系统范围变量来覆盖此行为,并按照RFC 1122[RFC1122]中的规定解释紧急指针。Windows 95仅支持一个字节的“紧急数据”。也就是说,只有紧急指针前面的字节被视为“紧急数据”[Windows95]。

Authors' Addresses

作者地址

Fernando Gont Universidad Tecnologica Nacional / Facultad Regional Haedo Evaristo Carriego 2644 Haedo, Provincia de Buenos Aires 1706 Argentina

阿根廷布宜诺斯艾利斯省费尔南多·冈特国家技术大学/学院地区哈多·埃瓦里斯托·卡里戈2644哈多1706

   Phone: +54 11 4650 8472
   EMail: fernando@gont.com.ar
   URI:   http://www.gont.com.ar
        
   Phone: +54 11 4650 8472
   EMail: fernando@gont.com.ar
   URI:   http://www.gont.com.ar
        

Andrew Yourtchenko Cisco De Kleetlaan, 7 Diegem B-1831 Belgium

Andrew Yourtchenko Cisco De Kleetlaan,7 Diegem B-1831比利时

   Phone: +32 2 704 5494
   EMail: ayourtch@cisco.com
        
   Phone: +32 2 704 5494
   EMail: ayourtch@cisco.com