draft-ietf-tcpm-urgent-data-07.txt   rfc6093.txt 
TCP Maintenance and Minor F. Gont Internet Engineering Task Force (IETF) F. Gont
Extensions (tcpm) UTN/FRH Request for Comments: 6093 UTN/FRH
Internet-Draft A. Yourtchenko Updates: 793, 1011, 1122 A. Yourtchenko
Updates: 793, 1011, 1122 Cisco Category: Standards Track Cisco
(if approved) October 16, 2010 ISSN: 2070-1721 January 2011
Intended status: Standards Track
Expires: April 19, 2011
On the implementation of the TCP urgent mechanism On the Implementation of the TCP Urgent Mechanism
draft-ietf-tcpm-urgent-data-07.txt
Abstract Abstract
This document analyzes how current TCP implementations process TCP This document analyzes how current TCP implementations process TCP
urgent indications, and how the behavior of some widely-deployed urgent indications and how the behavior of some widely deployed
middle-boxes affect how urgent indications are processed by end middleboxes affects how end systems process urgent indications. This
systems. This document updates the relevant specifications such that document updates the relevant specifications such that they
they accommodate current practice in processing TCP urgent accommodate current practice in processing TCP urgent indications,
indications, raises awareness about the reliability of TCP urgent raises awareness about the reliability of TCP urgent indications in
indications in the Internet and recommends against the use of the the Internet, and recommends against the use of urgent indications
urgent indications (but provides advice to applications in case that (but provides advice to applications that do).
they do).
Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the Status of This Memo
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering This is an Internet Standards Track document.
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 This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on April 19, 2011. 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.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction ....................................................3
2. Specification of the TCP urgent mechanism . . . . . . . . . . 4 2. Specification of the TCP Urgent Mechanism .......................3
2.1. Semantics of urgent indications . . . . . . . . . . . . . 4 2.1. Semantics of Urgent Indications ............................3
2.2. Semantics of the Urgent Pointer . . . . . . . . . . . . . 5 2.2. Semantics of the Urgent Pointer ............................4
2.3. Allowed length of urgent data . . . . . . . . . . . . . . 5 2.3. Allowed Length of "Urgent Data" ............................4
3. Current implementation practice of TCP urgent data . . . . . . 6 3. Current Implementation Practice of the TCP Urgent Mechanism .....5
3.1. Semantics of urgent indications . . . . . . . . . . . . . 6 3.1. Semantics of Urgent Indications ............................5
3.2. Semantics of the Urgent Pointer . . . . . . . . . . . . . 6 3.2. Semantics of the Urgent Pointer ............................5
3.3. Allowed length of urgent data . . . . . . . . . . . . . . 7 3.3. Allowed Length of "Urgent Data" ............................6
3.4. Interaction of middle-boxes with TCP urgent indications . 7 3.4. Interaction of Middleboxes with TCP Urgent Indications .....6
4. Updating RFC 793, RFC 1011, and RFC 1122 . . . . . . . . . . . 7 4. Updating RFC 793, RFC 1011, and RFC 1122 ........................6
5. Advice to new applications employing TCP . . . . . . . . . . . 8 5. Advice to New Applications Employing TCP ........................7
6. Advice to applications that make use of the urgent 6. Advice to Applications That Make Use of the Urgent Mechanism ....7
mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7. Security Considerations .........................................7
7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 8. Acknowledgements ................................................8
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 9. References ......................................................8
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 9.1. Normative References .......................................8
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 9.2. Informative References .....................................8
10.1. Normative References . . . . . . . . . . . . . . . . . . . 9 Appendix A. Survey of the Processing of TCP Urgent
10.2. Informative References . . . . . . . . . . . . . . . . . . 9 Indications by Some Popular TCP Implementations ......10
Appendix A. Survey of the processing of TCP urgent A.1. FreeBSD ...................................................10
indications by some popular TCP implementations . . . 10 A.2. Linux .....................................................10
A.1. FreeBSD . . . . . . . . . . . . . . . . . . . . . . . . . 10 A.3. NetBSD ....................................................10
A.2. Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 11 A.4. OpenBSD ...................................................11
A.3. NetBSD . . . . . . . . . . . . . . . . . . . . . . . . . . 11 A.5. Cisco IOS software ........................................11
A.4. OpenBSD . . . . . . . . . . . . . . . . . . . . . . . . . 11 A.6. Microsoft Windows 2000, Service Pack 4 ....................11
A.5. Cisco IOS software . . . . . . . . . . . . . . . . . . . . 12 A.7. Microsoft Windows 2008 ....................................11
A.6. Microsoft Windows 2000, Service Pack 4 . . . . . . . . . . 12 A.8. Microsoft Windows 95 ......................................11
A.7. Microsoft Windows 2008 . . . . . . . . . . . . . . . . . . 12
A.8. Microsoft Windows 95 . . . . . . . . . . . . . . . . . . . 12
Appendix B. Changes from previous versions of the draft (to
be removed by the RFC Editor before publishing
this document as an RFC) . . . . . . . . . . . . . . 12
B.1. Changes from draft-ietf-tcpm-urgent-data-06 . . . . . . . 12
B.2. Changes from draft-ietf-tcpm-urgent-data-05 . . . . . . . 13
B.3. Changes from draft-ietf-tcpm-urgent-data-04 . . . . . . . 13
B.4. Changes from draft-ietf-tcpm-urgent-data-03 . . . . . . . 13
B.5. Changes from draft-ietf-tcpm-urgent-data-02 . . . . . . . 13
B.6. Changes from draft-ietf-tcpm-urgent-data-01 . . . . . . . 13
B.7. Changes from draft-ietf-tcpm-urgent-data-00 . . . . . . . 13
B.8. Changes from draft-gont-tcpm-urgent-data-01 . . . . . . . 13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
This document analyzes how some current TCP implementations process This document analyzes how some current TCP implementations process
TCP urgent indications, and how the behavior of some widely-deployed TCP urgent indications, and how the behavior of some widely deployed
middle-boxes affect the processing of urgent indications by hosts. middleboxes affects the processing of urgent indications by hosts.
This document updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC This document updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC
1122 [RFC1122] such that they accommodate current practice in 1122 [RFC1122] such that they accommodate current practice in
processing TCP urgent indications, provides advice to applications processing TCP urgent indications. It also provides advice to
using the urgent mechanism, and raises awareness about the applications using the urgent mechanism and raises awareness about
reliability of TCP urgent indications in the current Internet. the reliability of TCP urgent indications in the current Internet.
Given the above issues and potential interoperability issues with Given the above issues and potential interoperability issues with
respect to the currently common default mode operation, it is respect to the currently common default mode operation, it is
strongly recommended that applications do not employ urgent strongly recommended that applications do not employ urgent
indications. Nevertheless, urgent indications are still retained as indications. Nevertheless, urgent indications are still retained as
a mandatory part of the TCP protocol to support the few legacy a mandatory part of the TCP protocol to support the few legacy
applications that employ them. However, it is expected that even applications that employ them. However, it is expected that even
these applications will have difficulties in environments with these applications will have difficulties in environments with
middle-boxes. middleboxes.
Section 2 describes what the current IETF specifications state with Section 2 describes what the current IETF specifications state with
respect to TCP urgent indications. Section 3 describes how some respect to TCP urgent indications. Section 3 describes how current
current TCP implementations actually process TCP urgent indications. TCP implementations actually process TCP urgent indications. Section
Section 4 updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 4 updates RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122
[RFC1122], such that they accommodate current practice in processing [RFC1122], such that they accommodate current practice in processing
TCP urgent indications. Section 5 provides advice to to new TCP urgent indications. Section 5 provides advice to new
applications employing TCP, with respect to the TCP urgent mechanism. applications employing TCP, with respect to the TCP urgent mechanism.
Section 6 provides advice to existing applications that use or rely Section 6 provides advice to existing applications that use or rely
on the TCP urgent mechanism. on the TCP urgent mechanism.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
2. Specification of the TCP urgent mechanism 2. Specification of the TCP Urgent Mechanism
2.1. Semantics of urgent indications 2.1. Semantics of Urgent Indications
TCP incorporates an "urgent mechanism" that allows the sending user TCP implements an "urgent mechanism" that allows the sending user to
to stimulate the receiving user to accept some "urgent data" and to stimulate the receiving user to accept some "urgent data" and that
permit the receiving TCP to indicate to the receiving user when all permits the receiving TCP to indicate to the receiving user when all
the currently known urgent data have been received by the receiving the currently known "urgent data" have been read.
user.
The TCP urgent mechanism permits a point in the data stream to be The TCP urgent mechanism permits a point in the data stream to be
designated as the end of urgent information. Whenever this point is designated as the end of urgent information. Whenever this point is
in advance of the receive sequence number (RCV.NXT) at the receiving 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 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 receive sequence number catches up to the urgent pointer, the TCP
must tell user to go into "normal mode" [RFC0793]. This means, for must tell user to go into "normal mode" [RFC0793]. This means, for
example, that data that was received as "normal data" might become example, that data that was received as "normal data" might become
"urgent data" if an urgent indication is received in some successive "urgent data" if an urgent indication is received in some successive
TCP segment before that data is consumed by the TCP user. TCP segment before that data is consumed by the TCP user.
The URG control flag indicates that the "Urgent Pointer" field is The URG control flag indicates that the "Urgent Pointer" field is
meaningful and must be added to the segment sequence number to yield meaningful and must be added to the segment sequence number to yield
the urgent pointer. The absence of this flag indicates that there is the urgent pointer. The absence of this flag indicates that there is
no urgent data outstanding [RFC0793]. no "urgent data" outstanding [RFC0793].
The TCP urgent mechanism is NOT a mechanism for sending "out-of-band" 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 data: the so-called "urgent data" should be delivered "in-line" to
the TCP user. the TCP user.
2.2. Semantics of the Urgent Pointer 2.2. Semantics of the Urgent Pointer
There is some ambiguity in RFC 793 [RFC0793] with respect to the 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 semantics of the Urgent Pointer. Section 3.1 (page 17) of RFC 793
[RFC0793] states that the Urgent Pointer "communicates the current [RFC0793] states that the Urgent Pointer "communicates the current
value of the urgent pointer as a positive offset from the sequence value of the urgent pointer as a positive offset from the sequence
number in this segment. The urgent pointer points to 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 number of the octet following the urgent data. This field is only be
interpreted in segments with the URG control bit set". However, interpreted in segments with the URG control bit set" (sic).
Section 3.9 (page 56) of RFC 793 [RFC0793] states, when describing However, Section 3.9 (page 56) of RFC 793 [RFC0793] states, when
the processing of the SEND call in the ESTABLISHED and CLOSE-WAIT describing the processing of the SEND call in the ESTABLISHED and
states, that "If the urgent flag is set, then SND.UP <- SND.NXT-1 and CLOSE-WAIT states, that "If the urgent flag is set, then SND.UP <-
set the urgent pointer in the outgoing segments". SND.NXT-1 and set the urgent pointer in the outgoing segments".
RFC 1011 [RFC1011] clarified this ambiguity in RFC 793 stating that RFC 1011 [RFC1011] clarified this ambiguity in RFC 793 stating that
"Page 17 is wrong. The urgent pointer points to the last octet of "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 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 [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 (page 84), that "the urgent pointer points to the sequence number of
the LAST octet (not LAST+1) in a sequence of urgent data." the LAST octet (not LAST+1) in a sequence of urgent data".
2.3. Allowed length of urgent data 2.3. Allowed Length of "Urgent Data"
RFC 793 [RFC0793] allows TCP peers to send urgent data of any length, RFC 793 [RFC0793] allows TCP peers to send "urgent data" of any
as the TCP urgent mechanism simply provides a pointer to an length, as the TCP urgent mechanism simply provides a pointer to an
interesting point in the data stream. In this respect, Section interesting point in the data stream. In this respect, Section
4.2.2.4 (page 84) of RFC 1122 explicitly states that "A TCP MUST 4.2.2.4 (page 84) of RFC 1122 [RFC1122] explicitly states that "A TCP
support a sequence of urgent data of any length". MUST support a sequence of urgent data of any length".
3. Current implementation practice of TCP urgent data 3. Current Implementation Practice of the TCP Urgent Mechanism
3.1. Semantics of urgent indications 3.1. Semantics of Urgent Indications
As discussed in Section 1, the TCP urgent mechanism simply permits a 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 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 information but does NOT provide a mechanism for sending "out-of-
data. band" data.
Unfortunately, virtually all TCP implementations process TCP urgent Unfortunately, virtually all TCP implementations process TCP urgent
data differently. By default, the last byte of "urgent data" is indications differently. By default, the last byte of "urgent data"
delivered "out of band" to the application. That is, it is not is delivered "out of band" to the application. That is, it is not
delivered as part of the normal data stream. For example, the "out delivered as part of the normal data stream [UNPv1]. For example,
of band" byte is read by an application when a recv(2) system call the "out-of-band" byte is read by an application when a recv(2)
with the MSG_OOB flag set is issued. system call with the MSG_OOB flag set is issued.
Most implementations provide a socket option (SO_OOBINLINE) that Most implementations provide a socket option (SO_OOBINLINE) that
allows an application to override the (broken) default processing of allows an application to override the (broken) default processing of
urgent data, so that it is delivered "in band" to the application, urgent indications, so that "urgent data" is delivered "in line" to
thus providing the semantics intended by the IETF specifications. the application, thus providing the semantics intended by the IETF
specifications.
3.2. Semantics of the Urgent Pointer 3.2. Semantics of the Urgent Pointer
All the popular implementations that the authors of this document All the popular implementations that the authors of this document
have been able to test interpret the semantics of the TCP Urgent 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 Pointer as specified in Section 3.1 of RFC 793. This means that even
when RFC 1122 officially updated RFC 793 to clarify the ambiguity in when RFC 1122 formally updated RFC 793 to clarify the ambiguity in
the semantics of the Urgent Pointer, this clarification was never the semantics of the Urgent Pointer, this clarification was never
reflected into actual implementations (i.e., virtually all reflected in actual implementations (i.e., virtually all
implementations default to the semantics of the urgent pointer implementations default to the semantics of the urgent pointer
specified in Section 3.1 of RFC 793). specified in Section 3.1 of RFC 793).
Some operating systems provide a system-wide toggle to override this Some operating systems provide a system-wide toggle to override this
behavior, and interpret the semantics of the Urgent Pointer as behavior and interpret the semantics of the Urgent Pointer as
clarified in RFC 1122. However, this system-wide toggle has been clarified in RFC 1122. However, this system-wide toggle has been
found to be inconsistent. For example, Linux provides the sysctl found to be inconsistent. For example, Linux provides the sysctl
"tcp_stdurg" (i.e., net.ipv4.tcp_stdurg) that, when set, supposedly "tcp_stdurg" (i.e., net.ipv4.tcp_stdurg) that, when set, supposedly
changes the system behavior to interpret the semantics of the TCP changes the system behavior to interpret the semantics of the TCP
Urgent Pointer as specified in RFC 1122. However, this sysctl Urgent Pointer as specified in RFC 1122. However, this sysctl changes
changes the semantics of the Urgent Pointer only for incoming the semantics of the Urgent Pointer only for incoming segments (i.e.,
segments, but not for outgoing segments. This means that if this not for outgoing segments). This means that if this sysctl is set,
sysctl is set, an application might be unable to interoperate with an application might be unable to interoperate with itself if both
itself if both the TCP sender and the TCP receiver are running on the the TCP sender and the TCP receiver are running on the same host.
same host.
3.3. Allowed length of urgent data 3.3. Allowed Length of "Urgent Data"
While Section 4.2.2.4 (page 84) of RFC 1122 explicitly states that "A 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 TCP MUST support a sequence of urgent data of any length", in
practice all those implementations that interpret TCP urgent practice, all those implementations that interpret TCP urgent
indications as a mechanism for sending out-of-band data keep a buffer indications as a mechanism for sending "out-of-band" data keep a
of a single byte for storing the "last byte of urgent data". Thus, buffer of a single byte for storing the "last byte of urgent data".
if successive indications of urgent data are received before the Thus, if successive indications of "urgent data" are received before
application reads the pending "out of band" byte, that pending byte the application reads the pending "out-of-band" byte, that pending
will be discarded (i.e., overwritten by the new byte of urgent data). byte will be discarded (i.e., overwritten by the new byte of "urgent
data").
In order to avoid urgent data from being discarded, some In order to avoid "urgent data" from being discarded, some
implementations queue each of the received "urgent bytes", so that implementations queue each of the received "urgent bytes", so that
even if another urgent indication is received before the pending even if another urgent indication is received before the pending
urgent data are consumed by the application, those bytes do not need "urgent data" are consumed by the application, those bytes do not
to be discarded. Some of these implementations have been known to need to be discarded. Some of these implementations have been known
fail to enforce any limits on the amount of urgent data that they to fail to enforce any limits on the amount of "urgent data" that
queue, thus resulting vulnerable to trivial resource exhaustion they queue; thus, they become vulnerable to trivial resource
attacks [CPNI-TCP]. exhaustion attacks [CPNI-TCP].
It should be reinforced that the aforementioned implementations are It should be reinforced that the aforementioned implementations are
broken. The TCP urgent mechanism is not a mechanism for delivering broken. The TCP urgent mechanism is not a mechanism for delivering
out-of-band data. "out-of-band" data.
3.4. Interaction of middle-boxes with TCP urgent indications 3.4. Interaction of Middleboxes with TCP Urgent Indications
As a result of the publication of Network Intrusion Detection (NIDs) As a result of the publication of Network Intrusion Detection System
evasion techniques based on TCP urgent indications [phrack], some (NIDS) evasion techniques based on TCP urgent indications [phrack],
middle-boxes clear the urgent indications by clearing the URG flag some middleboxes clear the urgent indications by clearing the URG
and setting the Urgent Pointer to zero. This causes the "urgent 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 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 the recv(2) call without the MSG_OOB flag) in the case of those TCP
implementations that implement the urgent mechanism as out-of-band implementations that interpret the TCP urgent mechanism as a facility
data (as described in Section 3.1). An example of such a middle-box for delivering "out-of-band" data (as described in Section 3.1). An
is the Cisco PIX firewall [Cisco-PIX]. This should discourage example of such a middlebox is the Cisco PIX firewall [Cisco-PIX].
applications from depending on urgent indications for their correct This should discourage applications from depending on urgent
operation, as urgent indications may not be reliable in the current indications for their correct operation, as urgent indications may
Internet. not be reliable in the current Internet.
4. Updating RFC 793, RFC 1011, and RFC 1122 4. Updating RFC 793, RFC 1011, and RFC 1122
Considering that as long as both the TCP sender and the TCP receiver Considering that as long as both the TCP sender and the TCP receiver
implement the same semantics for the Urgent Pointer there is no implement the same semantics for the Urgent Pointer there is no
functional difference in having the Urgent Pointer point to "the functional difference in having the Urgent Pointer point to "the
sequence number of the octet following the urgent data" vs. "the last sequence number of the octet following the urgent data" vs. "the
octet of urgent data", and since all known implementations interpret last octet of urgent data", and that all known implementations
the semantics of the Urgent Pointer as pointing to "the sequence interpret the semantics of the Urgent Pointer as pointing to "the
number of the octet following the urgent data", we hereby update RFC sequence number of the octet following the urgent data", we hereby
793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 [RFC1122], such that update RFC 793 [RFC0793], RFC 1011 [RFC1011], and RFC 1122 [RFC1122]
"the urgent pointer points to the sequence number of the octet such that "the urgent pointer points to the sequence number of the
following the urgent data" (in segments with the URG control bit octet following the urgent data" (in segments with the URG control
set), thus accommodating virtually all existing TCP implementations. bit set), thus accommodating virtually all existing TCP
implementations.
5. Advice to new applications employing TCP 5. Advice to New Applications Employing TCP
As a result of the issues discussed in Section 3.2 and Section 3.4, As a result of the issues discussed in Section 3.2 and Section 3.4,
new applications SHOULD NOT employ the TCP urgent mechanism. new applications SHOULD NOT employ the TCP urgent mechanism.
However, TCP implementations MUST still include support for the However, TCP implementations MUST still include support for the
urgent mechanism such that existing applications can still use it. urgent mechanism such that existing applications can still use it.
6. Advice to applications that make use of the urgent mechanism 6. Advice to Applications That Make Use of the Urgent Mechanism
Even though applications SHOULD NOT employ the urgent mechanism, Even though applications SHOULD NOT employ the urgent mechanism,
applications that still decide to employ it MUST set the SO_OOBINLINE applications that still decide to employ it MUST set the SO_OOBINLINE
socket option, such that "urgent data" is delivered inline, as socket option, such that "urgent data" is delivered in line, as
intended by the IETF specifications. intended by the IETF specifications.
Additionally, applications that still decide to use the urgent Additionally, applications that still decide to use the urgent
mechanism need to be designed for correct operation even when the URG mechanism need to be designed for correct operation even when the URG
flag is cleared by middleboxes. flag is cleared by middleboxes.
7. Security Considerations 7. Security Considerations
Multiple factors can affect the data flow that is actually delivered Multiple factors can affect the data flow that is actually delivered
to an application when the TCP urgent mechanism is employed; namely, to an application when the TCP urgent mechanism is employed: for
the two possible interpretations of the semantics of the Urgent example, the two possible interpretations of the semantics of the
Pointer in current implementations (e.g., depending on the value of Urgent Pointer in current implementations (e.g., depending on the
the tcp_stdurg sysctl), the possible implementation of the urgent value of the tcp_stdurg sysctl), the possible implementation of the
mechanism as an Out-Of-Band (OOB) facility (vs. in-band as intenteded urgent mechanism as an "out-of-band" (OOB) facility (versus "in-band"
by the IETF specifications), and middle-boxes (such as packet as intended by the IETF specifications), or middleboxes (such as
scrubbers) or the end-systems themselves that could cause the "urgent packet scrubbers) or the end-systems themselves that could cause the
data" to be processed "in band". This might make it difficult for a "urgent data" to be processed "in line". This might make it
Network Intrusion Detection System (NIDS) to track the application- difficult for a Network Intrusion Detection System (NIDS) to track
layer data transferred to the destination system, and thus lead to the application-layer data transferred to the destination system and
false negatives or false positives in the NIDS [CPNI-TCP] [phrack]. thus lead to false negatives or false positives in the NIDS
[CPNI-TCP] [phrack].
Probably the best way to avoid the security implications of TCP Probably the best way to avoid the security implications of TCP
urgent data is to avoid having applications use the TCP urgent "urgent data" is to avoid having applications use the TCP urgent
mechanism altogether. Packet scrubbers could probably be configured mechanism altogether. Packet scrubbers could probably be configured
to clear the URG bit, and set the Urgent Pointer to zero. This would to clear the URG bit and set the Urgent Pointer to zero. This would
basically cause the urgent data to be put "in band". However, this basically cause the "urgent data" to be put "in line". However, this
might cause interoperability problems or undesired behavior in those might cause interoperability problems or undesired behavior in those
applications that rely on the TCP urgent mechanism, such as Telner applications that rely on the TCP urgent mechanism, such as Telnet
[RFC0854] and FTP [RFC0959]. [RFC0854] and FTP [RFC0959].
8. IANA Considerations 8. Acknowledgements
This document has no actions for IANA.
9. Acknowledgements
The authors of this document would like to thank (in alphabetical The authors of this document would like to thank (in alphabetical
order) Jari Arkko, Ron Bonica, David Borman, Dave Cridland, Ralph order) Jari Arkko, Ron Bonica, David Borman, Dave Cridland, Ralph
Droms, Wesley Eddy, John Heffner, Alfred Hoenes, Alexey Melnikov, Droms, Wesley Eddy, John Heffner, Alfred Hoenes, Alexey Melnikov,
Keith Moore, Carlos Pignataro, Tim Polk, Anantha Ramaiah, Joe Touch, Keith Moore, Carlos Pignataro, Tim Polk, Anantha Ramaiah, Joe Touch,
Michael Welzl, Dan Wing, and Alexander Zimmermann for providing Michael Welzl, Dan Wing, and Alexander Zimmermann for providing
valuable feedback on earlier versions of this document. valuable feedback on earlier versions of this document.
Additionally, Fernando would like to thank David Borman and Joe Touch Fernando would like to thank David Borman and Joe Touch for a
for a fruitful discussion about TCP urgent mode at IETF 73 fruitful discussion about the TCP urgent mechanism at IETF 73
(Minneapolis). (Minneapolis).
10. References Fernando Gont's attendance to IETF meetings was supported by ISOC's
"Fellowship to the IETF" program.
10.1. Normative References Finally, Fernando Gont wishes to express deep and heartfelt gratitude
to Jorge Oscar Gont and Nelida Garcia for their precious motivation
and guidance.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 9. References
RFC 793, September 1981.
[RFC1011] Reynolds, J. and J. Postel, "Official Internet protocols", 9.1. Normative References
RFC 1011, May 1987.
[RFC1122] Braden, R., "Requirements for Internet Hosts - [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC
Communication Layers", STD 3, RFC 1122, October 1989. 793, September 1981.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC1011] Reynolds, J. and J. Postel, "Official Internet
Requirement Levels", BCP 14, RFC 2119, March 1997. protocols", RFC 1011, May 1987.
10.2. Informative References [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, October 1989.
[CPNI-TCP] [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Gont, F., "Security Assessment of the Transmission Control Requirement Levels", BCP 14, RFC 2119, March 1997.
Protocol (TCP)", http://www.cpni.gov.uk/Docs/
tn-03-09-security-assessment-TCP.pdf, 2009.
[Cisco-PIX] 9.2. Informative References
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". [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.
[Linux] The Linux Project, "http://www.kernel.org". [Cisco-PIX] Cisco PIX, "http://www.cisco.com/en/US/docs/security/
asa/asa70/command/reference/tz.html#wp1288756".
[NetBSD] The NetBSD project, "http://www.netbsd.org". [FreeBSD] The FreeBSD project, "http://www.freebsd.org".
[OpenBSD] The OpenBSD project, "http://www.openbsd.org". [Linux] The Linux Project, "http://www.kernel.org".
[RFC0854] Postel, J. and J. Reynolds, "Telnet Protocol [NetBSD] The NetBSD project, "http://www.netbsd.org".
Specification", STD 8, RFC 854, May 1983.
[RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", [OpenBSD] The OpenBSD project, "http://www.openbsd.org".
STD 9, RFC 959, October 1985.
[UNPv1] Stevens, W., "UNIX Network Programming, Volume 1. [RFC0854] Postel, J. and J. Reynolds, "Telnet Protocol
Networking APIs: Sockets and XTI", Prentice Hall PTR , Specification", STD 8, RFC 854, May 1983.
1997.
[Windows2000] [RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol",
Microsoft Windows 2000, "http://technet.microsoft.com/ STD 9, RFC 959, October 1985.
en-us/library/bb726981(printer).aspx".
[Windows95] [UNPv1] Stevens, W., "UNIX Network Programming, Volume 1.
Microsoft Windows 95, Networking APIs: Sockets and XTI", Prentice Hall PTR,
"ftp://ftp.demon.co.uk/pub/mirrors/win95netfaq/ 1997.
faq-c.html".
[phrack] Ko, Y., Ko, S., and M. Ko, "NIDS Evasion Method named [Windows2000] Microsoft Windows 2000, "http://technet.microsoft.com/
"SeolMa"", Phrack Magazine, Volume 0x0b, Issue 0x39, Phile en-us/library/bb726981(printer).aspx".
#0x03 of 0x12 http://www.phrack.org/
issues.html?issue=57&id=3#article, 2001.
Appendix A. Survey of the processing of TCP urgent indications by some [Windows95] Microsoft Windows 95, "ftp://ftp.demon.co.uk/pub/
popular TCP implementations mirrors/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.
Appendix A. Survey of the Processing of TCP Urgent Indications by Some
Popular TCP Implementations
A.1. FreeBSD A.1. FreeBSD
FreeBSD 8.0 [FreeBSD] interprets the semantics of the urgent pointer FreeBSD 8.0 [FreeBSD] interprets the semantics of the urgent pointer
as specified in Section 4 of this document. It does not provide any as specified in Section 4 of this document. It does not provide any
sysctl to override this behavior. sysctl to override this behavior.
FreeBSD provides the SO_OOBINLINE socket option that, when set, FreeBSD provides the SO_OOBINLINE socket option that, when set,
causes TCP "urgent data" to remain "in band". That is, it will be 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 accessible by the read(2) call or the recv(2) call without the
MSG_OOB flag. MSG_OOB flag.
FreeBSD supports only one byte of urgent data. That is, only the FreeBSD supports only one byte of "urgent data". That is, only the
byte preceding the Urgent Pointer is considered as "urgent data". byte preceding the Urgent Pointer is considered "urgent data".
A.2. Linux A.2. Linux
Linux 2.6.15-53-386 [Linux] interprets the semantics of the urgent 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 pointer as specified in Section 4 of this document. It provides the
net.ipv4.tcp_stdurg sysctl to override this behavior to interpret the net.ipv4.tcp_stdurg sysctl to override this behavior to interpret the
Urgent Pointer as specified in RFC 1122 [RFC1122]. However, this Urgent Pointer as specified in RFC 1122 [RFC1122]. However, this
sysctl only affects the processing of incoming segments (the Urgent sysctl only affects the processing of incoming segments (the Urgent
Pointer in outgoing segments will still be set as specified in Pointer in outgoing segments will still be set as specified in
Section 4 of this document). Section 4 of this document).
Linux provides the SO_OOBINLINE socket option that, when set, causes Linux provides the SO_OOBINLINE socket option that, when set, causes
TCP "urgent data" to remain "in band". That is, it will be 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 accessible by the read(2) call or the recv(2) call without the
MSG_OOB flag. MSG_OOB flag.
Linux supports only one byte of urgent data. That is, only the byte Linux supports only one byte of "urgent data". That is, only the
preceding the Urgent Pointer is considered as "urgent data". byte preceding the Urgent Pointer is considered "urgent data".
A.3. NetBSD A.3. NetBSD
NetBSD 5.0.1 [NetBSD] interprets the semantics of the urgent pointer 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 as specified in Section 4 of this document. It does not provide any
sysctl to override this behavior. sysctl to override this behavior.
NetBSD provides the SO_OOBINLINE socket option that, when set, causes NetBSD provides the SO_OOBINLINE socket option that, when set, causes
TCP "urgent data" to remain "in band". That is, it will be 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 accessible by the read(2) call or the recv(2) call without the
MSG_OOB flag. MSG_OOB flag.
NetBSD supports only one byte of urgent data. That is, only the byte NetBSD supports only one byte of "urgent data". That is, only the
preceding the Urgent Pointer is considered as "urgent data". byte preceding the Urgent Pointer is considered "urgent data".
A.4. OpenBSD A.4. OpenBSD
OpenBSD 4.2 [OpenBSD] interprets the semantics of the urgent pointer OpenBSD 4.2 [OpenBSD] interprets the semantics of the urgent pointer
as specified in Section 4 of this document. It does not provide any as specified in Section 4 of this document. It does not provide any
sysctl to override this behavior. sysctl to override this behavior.
OpenBSD provides the SO_OOBINLINE socket option that, when set, OpenBSD provides the SO_OOBINLINE socket option that, when set,
causes TCP urgent data to remain "in band". That is, it will be 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. accessible by the read(2) or recv(2) calls without the MSG_OOB flag.
OpenBSD supports only one byte of urgent data. That is, only the OpenBSD supports only one byte of "urgent data". That is, only the
byte preceding the Urgent Pointer is considered as "urgent data". byte preceding the Urgent Pointer is considered "urgent data".
A.5. Cisco IOS software A.5. Cisco IOS software
Cisco IOS Software Releases 12.2(18)SXF7, 12.4(15)T7 interpret the 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 semantics of the urgent pointer as specified in Section 4 of this
document. document.
The behavior is consistent with having the SO_OOBINLINE socket option The behavior is consistent with having the SO_OOBINLINE socket option
turned on, i.e. the data is processed "in band". turned on, i.e., the data is processed "in line".
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 Microsoft Windows 2000 [Windows2000] interprets the semantics of the
urgent pointer as specified in Section 4 of this document. It urgent pointer as specified in Section 4 of this document. It
provides the TcpUseRFC1122UrgentPointer system-wide variable to provides the TcpUseRFC1122UrgentPointer system-wide variable to
override this behavior, interpreting the Urgent Pointer as specified override this behavior, interpreting the Urgent Pointer as specified
in RFC 1122 [RFC1122]. in RFC 1122 [RFC1122].
Tests performed with a sample server application compiled using the Tests performed with a sample server application compiled using the
cygwin environment has shown that the default behavior is to return cygwin environment has shown that the default behavior is to return
the urgent data "in band". the "urgent data" "in line".
A.7. Microsoft Windows 2008 A.7. Microsoft Windows 2008
Microsoft Windows 2008 interprets the semantics of the urgent pointer Microsoft Windows 2008 interprets the semantics of the urgent pointer
as specified in Section 4 of this document. as specified in Section 4 of this document.
A.8. Microsoft Windows 95 A.8. Microsoft Windows 95
Microsoft Windows 95 interprets the semantics of the urgent pointer Microsoft Windows 95 interprets the semantics of the urgent pointer
as specified in Section 4 of this document. It provides the as specified in Section 4 of this document. It provides the
BSDUrgent system-wide variable to override this behavior, BSDUrgent system-wide variable to override this behavior,
interpreting the Urgent Pointer as specified in RFC 1122 [RFC1122]. interpreting the Urgent Pointer as specified in RFC 1122 [RFC1122].
Windows 95 supports only one byte of urgent data. That is, only the Windows 95 supports only one byte of "urgent data". That is, only
byte preceding the Urgent Pointer is considered as "urgent data". the byte preceding the Urgent Pointer is considered "urgent data"
[Windows95] [Windows95].
Appendix B. Changes from previous versions of the draft (to be removed
by the RFC Editor before publishing this document as an
RFC)
B.1. Changes from draft-ietf-tcpm-urgent-data-06
o Addresses Jari Arkko's and Tim Polk's DISCUSSes, and various
COMMENTs by members of the IESG.
o Addresses IETF LC comments.
B.2. Changes from draft-ietf-tcpm-urgent-data-05
o Draft resubmitted (with no changes) because it was close to the
expiration day.
B.3. Changes from draft-ietf-tcpm-urgent-data-04
o Fixes grammar errors wrt the term "data" (thanks to David Borman,
once again ;-) )
B.4. Changes from draft-ietf-tcpm-urgent-data-03
o Addresses feedback sent by David Borman, and nit pointed out by
John Heffner.
B.5. Changes from draft-ietf-tcpm-urgent-data-02
o Addresses WGLC feedback submitted by Michael Welzl, Anantha
Ramaiah, and Wesley Eddy.
B.6. Changes from draft-ietf-tcpm-urgent-data-01
o Fixes reference to Cisco IOS Software (layer 8+ stuff ;-) ).
o Cleaned-up Appendix A.5.
B.7. Changes from draft-ietf-tcpm-urgent-data-00
o Minor editorial changes.
o Incorporated the specific changes/advice stated in
http://www.ietf.org/mail-archive/web/tcpm/current/msg04548.html in
different sections (Section 4, Section 5, Section 6).
B.8. Changes from draft-gont-tcpm-urgent-data-01
o Draft resubmitted as draft-ietf, as a result of wg consensus on
adopting the document as a tcpm wg item.
Authors' Addresses Authors' Addresses
Fernando Gont Fernando Gont
Universidad Tecnologica Nacional / Facultad Regional Haedo Universidad Tecnologica Nacional / Facultad Regional Haedo
Evaristo Carriego 2644 Evaristo Carriego 2644
Haedo, Provincia de Buenos Aires 1706 Haedo, Provincia de Buenos Aires 1706
Argentina Argentina
Phone: +54 11 4650 8472 Phone: +54 11 4650 8472
Email: fernando@gont.com.ar EMail: fernando@gont.com.ar
URI: http://www.gont.com.ar URI: http://www.gont.com.ar
Andrew Yourtchenko Andrew Yourtchenko
Cisco Cisco
De Kleetlaan, 7 De Kleetlaan, 7
Diegem B-1831 Diegem B-1831
Belgium Belgium
Phone: +32 2 704 5494 Phone: +32 2 704 5494
Email: ayourtch@cisco.com EMail: ayourtch@cisco.com
 End of changes. 84 change blocks. 
291 lines changed or deleted 220 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/