Skip to content

Commit

Permalink
Merge pull request #683 from ARMmbed/prepare-rc-2.7.15-updated
Browse files Browse the repository at this point in the history
Prepare rc 2.7.15 updated
  • Loading branch information
yanesca authored Apr 9, 2020
2 parents c835510 + 0a99708 commit 21522a4
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 14 deletions.
11 changes: 10 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mbed TLS ChangeLog (Sorted per branch, date)

= mbed TLS x.x.x branch released xxxx-xx-xx
= mbed TLS 2.7.15 branch released 2020-04-14

Security
* Fix bug in DTLS handling of new associations with the same parameters
Expand All @@ -10,10 +10,19 @@ Security
could use that to obtain a Denial of Service. This could only happen when
MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h (which it is
by default).
* Fix side channel in ECC code that allowed an adversary with access to
precise enough timing and memory access information (typically an
untrusted operating system attacking a secure enclave) to fully recover
an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya,
Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932
* Fix a potentially remotely exploitable buffer overread in a
DTLS client when parsing the Hello Verify Request message.

Bugfix
* Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and
MBEDTLS_SSL_HW_RECORD_ACCEL are enabled.
* Fix a function name in a debug message. Contributed by Ercan Ozturk in
#3013.

= mbed TLS 2.7.14 branch released 2020-02-20

Expand Down
2 changes: 1 addition & 1 deletion doxygen/input/doc_mainpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/

/**
* @mainpage mbed TLS v2.7.14 source code documentation
* @mainpage mbed TLS v2.7.15 source code documentation
*
* This documentation describes the internal structure of mbed TLS. It was
* automatically generated from specially formatted comment blocks in
Expand Down
2 changes: 1 addition & 1 deletion doxygen/mbedtls.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ DOXYFILE_ENCODING = UTF-8
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.

PROJECT_NAME = "mbed TLS v2.7.14"
PROJECT_NAME = "mbed TLS v2.7.15"

# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
Expand Down
8 changes: 4 additions & 4 deletions include/mbedtls/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
*/
#define MBEDTLS_VERSION_MAJOR 2
#define MBEDTLS_VERSION_MINOR 7
#define MBEDTLS_VERSION_PATCH 14
#define MBEDTLS_VERSION_PATCH 15

/**
* The single version number has the following structure:
* MMNNPP00
* Major version | Minor version | Patch version
*/
#define MBEDTLS_VERSION_NUMBER 0x02070E00
#define MBEDTLS_VERSION_STRING "2.7.14"
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.7.14"
#define MBEDTLS_VERSION_NUMBER 0x02070F00
#define MBEDTLS_VERSION_STRING "2.7.15"
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.7.15"

#if defined(MBEDTLS_VERSION_C)

Expand Down
6 changes: 3 additions & 3 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ endif(USE_STATIC_MBEDTLS_LIBRARY)

if(USE_SHARED_MBEDTLS_LIBRARY)
add_library(mbedcrypto SHARED ${src_crypto})
set_target_properties(mbedcrypto PROPERTIES VERSION 2.7.14 SOVERSION 2)
set_target_properties(mbedcrypto PROPERTIES VERSION 2.7.15 SOVERSION 2)
target_link_libraries(mbedcrypto ${libs})

add_library(mbedx509 SHARED ${src_x509})
set_target_properties(mbedx509 PROPERTIES VERSION 2.7.14 SOVERSION 0)
set_target_properties(mbedx509 PROPERTIES VERSION 2.7.15 SOVERSION 0)
target_link_libraries(mbedx509 ${libs} mbedcrypto)

add_library(mbedtls SHARED ${src_tls})
set_target_properties(mbedtls PROPERTIES VERSION 2.7.14 SOVERSION 10)
set_target_properties(mbedtls PROPERTIES VERSION 2.7.15 SOVERSION 10)
target_link_libraries(mbedtls ${libs} mbedx509)

install(TARGETS mbedtls mbedx509 mbedcrypto
Expand Down
28 changes: 28 additions & 0 deletions library/ecp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,20 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
* Now get m * P from M * P and normalize it
*/
MBEDTLS_MPI_CHK( ecp_safe_invert_jac( grp, R, ! m_is_odd ) );

/*
* Knowledge of the jacobian coordinates may leak the last few bits of the
* scalar [1], and since our MPI implementation isn't constant-flow,
* inversion (used for coordinate normalization) may leak the full value
* of its input via side-channels [2].
*
* [1] https://eprint.iacr.org/2003/191
* [2] https://eprint.iacr.org/2020/055
*
* Avoid the leak by randomizing coordinates before we normalize them.
*/
if( f_rng != 0 )
MBEDTLS_MPI_CHK( ecp_randomize_jac( grp, R, f_rng, p_rng ) );
MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, R ) );

cleanup:
Expand Down Expand Up @@ -1664,6 +1678,20 @@ static int ecp_mul_mxz( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_swap( &R->Z, &RP.Z, b ) );
}

/*
* Knowledge of the projective coordinates may leak the last few bits of the
* scalar [1], and since our MPI implementation isn't constant-flow,
* inversion (used for coordinate normalization) may leak the full value
* of its input via side-channels [2].
*
* [1] https://eprint.iacr.org/2003/191
* [2] https://eprint.iacr.org/2020/055
*
* Avoid the leak by randomizing coordinates before we normalize them.
*/
if( f_rng != NULL )
MBEDTLS_MPI_CHK( ecp_randomize_mxz( grp, R, f_rng, p_rng ) );

MBEDTLS_MPI_CHK( ecp_normalize_mxz( grp, R ) );

cleanup:
Expand Down
16 changes: 14 additions & 2 deletions library/ssl_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,19 @@ static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl )

MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse hello verify request" ) );

/* Check that there is enough room for:
* - 2 bytes of version
* - 1 byte of cookie_len
*/
if( mbedtls_ssl_hs_hdr_len( ssl ) + 3 > ssl->in_msglen )
{
MBEDTLS_SSL_DEBUG_MSG( 1,
( "incoming HelloVerifyRequest message is too short" ) );
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR );
return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
}

/*
* struct {
* ProtocolVersion server_version;
Expand Down Expand Up @@ -1439,8 +1452,6 @@ static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl )
}

cookie_len = *p++;
MBEDTLS_SSL_DEBUG_BUF( 3, "cookie", p, cookie_len );

if( ( ssl->in_msg + ssl->in_msglen ) - p < cookie_len )
{
MBEDTLS_SSL_DEBUG_MSG( 1,
Expand All @@ -1449,6 +1460,7 @@ static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR );
return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
}
MBEDTLS_SSL_DEBUG_BUF( 3, "cookie", p, cookie_len );

mbedtls_free( ssl->handshake->verify_cookie );

Expand Down
4 changes: 2 additions & 2 deletions tests/suites/test_suite_version.data
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Check compiletime library version
check_compiletime_version:"2.7.14"
check_compiletime_version:"2.7.15"

Check runtime library version
check_runtime_version:"2.7.14"
check_runtime_version:"2.7.15"

Check for MBEDTLS_VERSION_C
check_feature:"MBEDTLS_VERSION_C":0
Expand Down

0 comments on commit 21522a4

Please sign in to comment.