mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Fix integer overflows in buffer bound checks
Fix potential integer overflows in the following functions: * mbedtls_md2_update() to be bypassed and cause * mbedtls_cipher_update() * mbedtls_ctr_drbg_reseed() This overflows would mainly be exploitable in 32-bit systems and could cause buffer bound checks to be bypassed.
This commit is contained in:
committed by
Simon Butcher
parent
49d29337fa
commit
6a54336897
@ -39,6 +39,11 @@ void ctr_drbg_special_behaviours( )
|
||||
TEST_ASSERT( mbedtls_ctr_drbg_reseed( &ctx, additional,
|
||||
MBEDTLS_CTR_DRBG_MAX_SEED_INPUT + 1 ) ==
|
||||
MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG );
|
||||
|
||||
mbedtls_ctr_drbg_set_entropy_len( &ctx, ~0 );
|
||||
TEST_ASSERT( mbedtls_ctr_drbg_reseed( &ctx, additional,
|
||||
MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ) ==
|
||||
MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG );
|
||||
exit:
|
||||
mbedtls_ctr_drbg_free( &ctx );
|
||||
}
|
||||
|
Reference in New Issue
Block a user