mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01: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:
parent
c32c6b56ca
commit
060c56871c
3 changed files with 15 additions and 5 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue