mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 03:35:40 +00:00
Merge branch 'iotssl-1368-unsafe-bounds-check-psk-identity-merge-2.1' into mbedtls-2.1-restricted
This commit is contained in:
commit
a90c3da42f
|
@ -1,6 +1,5 @@
|
||||||
mbed TLS ChangeLog (Sorted per branch, date)
|
mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
|
|
||||||
|
|
||||||
= mbed TLS 2.1.10 branch released 2017-xx-xx
|
= mbed TLS 2.1.10 branch released 2017-xx-xx
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
@ -9,6 +8,8 @@ Security
|
||||||
Security Initiative, Qualcomm Technologies Inc.
|
Security Initiative, Qualcomm Technologies Inc.
|
||||||
* Fix buffer overflow in RSA-PSS verification when the unmasked
|
* Fix buffer overflow in RSA-PSS verification when the unmasked
|
||||||
data is all zeros.
|
data is all zeros.
|
||||||
|
* Fix unsafe bounds check in ssl_parse_client_psk_identity() when adding
|
||||||
|
64kB to the address of the SSL buffer wraps around.
|
||||||
|
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were
|
* Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were
|
||||||
|
|
|
@ -3249,7 +3249,7 @@ static int ssl_parse_client_psk_identity( mbedtls_ssl_context *ssl, unsigned cha
|
||||||
/*
|
/*
|
||||||
* Receive client pre-shared key identity name
|
* Receive client pre-shared key identity name
|
||||||
*/
|
*/
|
||||||
if( *p + 2 > end )
|
if( end - *p < 2 )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) );
|
||||||
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE );
|
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE );
|
||||||
|
@ -3258,7 +3258,7 @@ static int ssl_parse_client_psk_identity( mbedtls_ssl_context *ssl, unsigned cha
|
||||||
n = ( (*p)[0] << 8 ) | (*p)[1];
|
n = ( (*p)[0] << 8 ) | (*p)[1];
|
||||||
*p += 2;
|
*p += 2;
|
||||||
|
|
||||||
if( n < 1 || n > 65535 || *p + n > end )
|
if( n < 1 || n > 65535 || n > (size_t) ( end - *p ) )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) );
|
||||||
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE );
|
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE );
|
||||||
|
|
Loading…
Reference in a new issue