Skip to content

Commit

Permalink
Reordered extension fields and added to ChangeLog
Browse files Browse the repository at this point in the history
Reordered the transmission sequence of TLS extension fields in client hello
and added to ChangeLog.
  • Loading branch information
simonbutcher committed Oct 1, 2015
1 parent b1e325d commit 643a922
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,5 +1,15 @@
mbed TLS ChangeLog (Sorted per branch, date)

= mbed TLS 1.3.14 released 2015-10-xx

Security
* Added fix for CVE-2015-xxxxx to prevent heap corruption due to buffer
overflow of the hostname or session ticket. (Found by Guido Vranken)

Changes
* Added checking of hostname length in ssl_set_hostname() to ensure domain
names are compliant with RFC 1035.

= mbed TLS 1.3.13 reladsed 2015-09-17

Security
Expand Down
10 changes: 5 additions & 5 deletions library/ssl_cli.c
Expand Up @@ -75,7 +75,7 @@ static void ssl_write_hostname_ext( ssl_context *ssl,
SSL_DEBUG_MSG( 3, ( "client hello, adding server name extension: %s",
ssl->hostname ) );

if( (size_t)(end - p) < ssl->hostname_len + 9 )
if( end < p || (size_t)( end - p ) < ssl->hostname_len + 9 )
{
SSL_DEBUG_MSG( 1, ( "buffer too small" ) );
return;
Expand Down Expand Up @@ -877,13 +877,13 @@ static int ssl_write_client_hello( ssl_context *ssl )
ext_len += olen;
#endif

#if defined(POLARSSL_SSL_SESSION_TICKETS)
ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen );
#if defined(POLARSSL_SSL_ALPN)
ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen );
ext_len += olen;
#endif

#if defined(POLARSSL_SSL_ALPN)
ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen );
#if defined(POLARSSL_SSL_SESSION_TICKETS)
ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen );
ext_len += olen;
#endif

Expand Down

0 comments on commit 643a922

Please sign in to comment.