1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
<pre>Internet Engineering Task Force (IETF) A. Langley
Request for Comments: 7685 Google Inc
Updates: <a href="./rfc5246">5246</a> October 2015
Category: Standards Track
ISSN: 2070-1721
<span class="h1">A Transport Layer Security (TLS) ClientHello Padding Extension</span>
Abstract
This memo describes a Transport Layer Security (TLS) extension that
can be used to pad ClientHello messages to a desired size.
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 <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7685">http://www.rfc-editor.org/info/rfc7685</a>.
Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.
<span class="grey">Langley Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7685">RFC 7685</a> TLS ClientHello Padding Extension October 2015</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Requirements Notation . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-3">3</a>. Padding Extension . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-4">4</a>. Example Usage . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-5">5</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-6">6</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-7">7</a>. Normative References . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Successive TLS [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>] versions have added support for more cipher
suites and, over time, more TLS extensions have been defined. This
has caused the size of the TLS ClientHello to grow, and the
additional size has caused some implementation bugs to come to light.
At least one of these implementation bugs can be ameliorated by
making the ClientHello even larger. This is desirable given that
fully comprehensive patching of affected implementations is difficult
to achieve.
This memo describes a TLS extension that can be used to pad a
ClientHello to a desired size in order to avoid implementation bugs
caused by certain ClientHello sizes.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Requirements Notation</span>
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 <a href="./rfc2119">RFC 2119</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Padding Extension</span>
A new extension type ("padding(21)") is defined and MAY be included
by the client in its ClientHello message.
enum {
padding(21), (65535)
} ExtensionType;
<span class="grey">Langley Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7685">RFC 7685</a> TLS ClientHello Padding Extension October 2015</span>
The "extension_data" for the extension consists of an arbitrary
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
extension would include six bytes of "extension_data" and would be
encoded as:
00 15 00 06 00 00 00 00 00 00
|---| |---| |---------------|
| | |
| | \- extension_data: 6 zero bytes
| |
| \------------- 16-bit, extension_data length
|
\------------------- extension_type for padding extension
The client MUST fill the padding extension completely with zero
bytes, although the padding extension_data field may be empty.
The server MUST NOT echo the extension.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Example Usage</span>
As an example, consider a client that wishes to avoid sending a
ClientHello with a TLSCiphertext.length between 256 and 511 bytes
(inclusive). This case is considered because at least one TLS
implementation is known to hang the connection when such a
ClientHello record is received.
After building a ClientHello as normal, the client can add four bytes
to the length (to account for the "msg_type" and "length" fields of
the handshake protocol) and test whether the resulting length falls
into that range. If it does, a padding extension can be added in
order to push the length to (at least) 512 bytes.
Note that if the original ClientHello size was between 505 and 507
bytes, then, with the handshake protocol overhead, the record payload
would be between 509 and 511 bytes long. Since it's not possible for
an extension to take less than four bytes of space, the additional
padding would have to expand the ClientHello record payload beyond
512 bytes in these cases.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
The contents of the padding extension could be used as a covert
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
a much smaller covert channel.
<span class="grey">Langley Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7685">RFC 7685</a> TLS ClientHello Padding Extension October 2015</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
IANA has permanently registered value 21 (padding) in the
"ExtensionType Values" registry.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC5246">RFC5246</a>] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", <a href="./rfc5246">RFC 5246</a>,
DOI 10.17487/RFC5246, August 2008,
<<a href="http://www.rfc-editor.org/info/rfc5246">http://www.rfc-editor.org/info/rfc5246</a>>.
Acknowledgements
The author gratefully acknowledges the contributions of Wan-Teh Chang
and the suggestions of Eric Rescorla.
Author's Address
Adam Langley
Google Inc
Email: agl@google.com
Langley Standards Track [Page 4]
</pre>
|