draft-ietf-tls-padding-04.txt   rfc7685.txt 
Network Working Group A. Langley Internet Engineering Task Force (IETF) A. Langley
Internet-Draft Google Inc Request for Comments: 7685 Google Inc
Updates: 5246 (if approved) Sept 2015 Updates: 5246 October 2015
Intended status: Standards Track Category: Standards Track
Expires: March 11, 2016 ISSN: 2070-1721
A TLS ClientHello padding extension A Transport Layer Security (TLS) ClientHello Padding Extension
draft-ietf-tls-padding-04
Abstract Abstract
This memo describes a TLS extension that can be used to pad This memo describes a Transport Layer Security (TLS) extension that
ClientHello messages to a desired size. can be used to pad ClientHello messages to a desired size.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months 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 March 11, 2016. 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/rfc7685.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 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
skipping to change at page 2, line 10 skipping to change at page 2, line 10
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Requirements Notation . . . . . . . . . . . . . . . . . . . . 2 2. Requirements Notation . . . . . . . . . . . . . . . . . . . . 2
3. Padding Extension . . . . . . . . . . . . . . . . . . . . . . 2 3. Padding Extension . . . . . . . . . . . . . . . . . . . . . . 2
4. Example usage . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Example Usage . . . . . . . . . . . . . . . . . . . . . . . . 3
5. Security Considerations . . . . . . . . . . . . . . . . . . . 3 5. Security Considerations . . . . . . . . . . . . . . . . . . . 3
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 7. Normative References . . . . . . . . . . . . . . . . . . . . 4
8. Normative References . . . . . . . . . . . . . . . . . . . . 4 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 4
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4
1. Introduction 1. Introduction
Successive TLS [RFC5246] versions have added support for more cipher Successive TLS [RFC5246] versions have added support for more cipher
suites and, over time, more TLS extensions have been defined. This suites and, over time, more TLS extensions have been defined. This
has caused the size of the TLS ClientHello to grow and the additional has caused the size of the TLS ClientHello to grow, and the
size has caused some implementation bugs to come to light. At least additional size has caused some implementation bugs to come to light.
one of these implementation bugs can be ameliorated by making the At least one of these implementation bugs can be ameliorated by
ClientHello even larger. This is desirable given that fully making the ClientHello even larger. This is desirable given that
comprehensive patching of affected implementations is difficult to fully comprehensive patching of affected implementations is difficult
achieve. to achieve.
This memo describes a TLS extension that can be used to pad a This memo describes a TLS extension that can be used to pad a
ClientHello to a desired size in order to avoid implementation bugs ClientHello to a desired size in order to avoid implementation bugs
caused by certain ClientHello sizes. caused by certain ClientHello sizes.
2. Requirements Notation 2. Requirements Notation
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].
3. Padding Extension 3. Padding Extension
A new extension type ("padding(21)") is defined and MAY be included A new extension type ("padding(21)") is defined and MAY be included
by the client in its ClientHello message. by the client in its ClientHello message.
enum { enum {
padding(21), (65535) padding(21), (65535)
} ExtensionType; } ExtensionType;
The "extension_data" for the extension consists of an arbitrary The "extension_data" for the extension consists of an arbitrary
number of zero bytes. For example, the smallest "padding" extension number of zero bytes. For example, the smallest "padding" extension
is four bytes long and is encoded as 0x00 0x15 0x00 0x00. A ten byte is four bytes long and is encoded as 0x00 0x15 0x00 0x00. A ten-byte
extension would include 6 bytes of "extension_data" and would be extension would include six bytes of "extension_data" and would be
encoded as: encoded as:
00 15 00 06 00 00 00 00 00 00 00 15 00 06 00 00 00 00 00 00
|---| |---| |---------------| |---| |---| |---------------|
| | | | | |
| | \- extension_data: 6 zero bytes | | \- extension_data: 6 zero bytes
| | | |
| \------------- 16-bit, extension_data length | \------------- 16-bit, extension_data length
| |
\------------------- extension_type for padding extension \------------------- extension_type for padding extension
The client MUST fill the padding extension completely with zero The client MUST fill the padding extension completely with zero
bytes, although the padding extension_data field may be empty. bytes, although the padding extension_data field may be empty.
The server MUST NOT echo the extension. The server MUST NOT echo the extension.
4. Example usage 4. Example Usage
As an example, consider a client that wishes to avoid sending a As an example, consider a client that wishes to avoid sending a
ClientHello with a record size between 256 and 511 bytes (inclusive). ClientHello with a TLSCiphertext.length between 256 and 511 bytes
This case is considered because at least one TLS implementation is (inclusive). This case is considered because at least one TLS
known to hang the connection when such a ClientHello record is implementation is known to hang the connection when such a
received. ClientHello record is received.
After building a ClientHello as normal, the client can add four to After building a ClientHello as normal, the client can add four bytes
the length (to account for the "msg_type" and "length" fields of the to the length (to account for the "msg_type" and "length" fields of
handshake protocol) and test whether the resulting length falls into the handshake protocol) and test whether the resulting length falls
that range. If it does, a padding extension can be added in order to into that range. If it does, a padding extension can be added in
push the length to (at least) 512 bytes. order to push the length to (at least) 512 bytes.
Note that if the original ClientHello size was between 505 and 507 Note that if the original ClientHello size was between 505 and 507
bytes then, with the handshake protocol overhead, the record would be bytes, then, with the handshake protocol overhead, the record payload
between 509 and 511 bytes long. Since it's not possible for an would be between 509 and 511 bytes long. Since it's not possible for
extension to take less than four bytes of space, the additional an extension to take less than four bytes of space, the additional
padding would have to expand the ClientHello record past 512 bytes in padding would have to expand the ClientHello record payload beyond
these cases. 512 bytes in these cases.
5. Security Considerations 5. Security Considerations
The contents of the padding extension could be used as a covert The contents of the padding extension could be used as a covert
channel. In order to prevent this, the contents are required to be channel. In order to prevent this, the contents are required to be
all zeros, although the length of the extension can still be used as all zeros, although the length of the extension can still be used as
a much smaller covert channel. a much smaller covert channel.
6. IANA Considerations 6. IANA Considerations
RFC EDITOR: Please delete this section prior to publication. IANA has permanently registered value 21 (padding) in the
"ExtensionType Values" registry.
An early code-point assignment (21) was made for this draft in the
registry of TLS ExtensionType values. IANA is requested to
permanently assign this code-point.
7. Acknowledgements
The author gratefully acknowledges the contributions of Wan-Teh Chang
and the suggestions of Eric Rescorla.
8. Normative References 7. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>. <http://www.rfc-editor.org/info/rfc5246>.
Acknowledgements
The author gratefully acknowledges the contributions of Wan-Teh Chang
and the suggestions of Eric Rescorla.
Author's Address Author's Address
Adam Langley Adam Langley
Google Inc Google Inc
Email: agl@google.com Email: agl@google.com
 End of changes. 19 change blocks. 
61 lines changed or deleted 53 lines changed or added

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