mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 23:25:44 +01:00
Fix a buffer overflow in hmac_setup_internal
At the end of `psa_hmac_setup_internal()`, the ipad is cleared. However, the size that was given to clear was `key_len` which is larger than the size of `ipad`.
This commit is contained in:
parent
92348d1c49
commit
296eca6e76
@ -2735,7 +2735,7 @@ static psa_status_t psa_hmac_setup_internal( psa_hmac_internal_data *hmac,
|
||||
status = psa_hash_update( &hmac->hash_ctx, ipad, block_size );
|
||||
|
||||
cleanup:
|
||||
mbedtls_platform_zeroize( ipad, key_length );
|
||||
mbedtls_platform_zeroize( ipad, sizeof(ipad) );
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user