mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-13 14:22:19 +08:00
mbedtls_md_setup() allocates a hash-specific context and then, if requested, an extra HMAC context. If the second allocation failed, the hash context was not freed. Fix this by ensuring that the mbedtls_md_context_t object is always in a consistent state, in particular, that the md_info field is always set. For robustness, ensure that the object is in a consistent state even on errors (other than BAD_INPUT_DATA if the object was not in a consistent state on entry). Fix #3486 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
||
|---|---|---|
| .. | ||
| 00README.md | ||
| bugfix_PR3452.txt | ||
| build_with_only_montgomery_curves.txt | ||
| cmake-install.txt | ||
| do_not_persist_volatile_external_keys.txt | ||
| format-signedness.txt | ||
| md_setup-leak.txt | ||
| psa_curve25519_key_support.txt | ||
| psa_curve25519_public_key_import.txt | ||
| psa_ecc_dh_macros.txt | ||
| x509write_csr_heap_alloc.txt | ||