mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-22 05:46:41 +01:00
- Fixed potential memory zeroization on miscrafted RSA key
This commit is contained in:
parent
5552c8c0b3
commit
3c16db9a10
2 changed files with 3 additions and 1 deletions
|
|
@ -679,7 +679,7 @@ int rsa_pkcs1_sign( rsa_context *ctx,
|
|||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
if( nb_pad < 8 )
|
||||
if( ( nb_pad < 8 ) || ( nb_pad > olen ) )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
*p++ = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue