File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 10
10
* Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the
11
11
buffer after DER certificates to be included in the raw representation.
12
12
* Fix issue that caused a hang when generating RSA keys of odd bitlength
13
+ * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer
14
+ dereference possible.
13
15
14
16
Changes
15
17
* On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
Original file line number Diff line number Diff line change @@ -590,7 +590,8 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx,
590
590
if ( mode == MBEDTLS_RSA_PRIVATE && ctx -> padding != MBEDTLS_RSA_PKCS_V15 )
591
591
return ( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
592
592
593
- if ( f_rng == NULL )
593
+ // We don't check p_rng because it won't be dereferenced here
594
+ if ( f_rng == NULL || input == NULL || output == NULL )
594
595
return ( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
595
596
596
597
olen = ctx -> len ;
You can’t perform that action at this time.
0 commit comments