mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
- Fixed possible heap overflow in pkcs1_decrypt on data larger than output
buffer after padding. For instance the premaster decryption in ssl_parse_client_key_exchange() in ssl_serv.c (Thanks to Christophe Devine)
This commit is contained in:
@ -726,7 +726,8 @@ static int ssl_parse_client_key_exchange( ssl_context *ssl )
|
||||
}
|
||||
|
||||
ret = rsa_pkcs1_decrypt( ssl->rsa_key, RSA_PRIVATE, &ssl->pmslen,
|
||||
ssl->in_msg + i, ssl->premaster );
|
||||
ssl->in_msg + i, ssl->premaster,
|
||||
sizeof(ssl->premaster) );
|
||||
|
||||
if( ret != 0 || ssl->pmslen != 48 ||
|
||||
ssl->premaster[0] != ssl->max_major_ver ||
|
||||
|
Reference in New Issue
Block a user