Gilles Peskine
d15c740df6
Fix memory leak in mbedtls_md_setup with HMAC
...
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>
2020-08-19 12:04:56 +02:00
..
2015-06-25 10:59:56 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-03 09:44:18 +02:00
2020-03-24 22:57:11 +01:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-22 03:17:23 +02:00
2020-07-22 03:17:25 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-03 09:44:18 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-08-19 12:04:56 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-04 01:43:41 +08:00
2020-07-02 11:26:57 +02:00
2020-07-07 09:20:44 +02:00
2020-07-07 09:20:44 +02:00
2020-07-02 11:26:57 +02:00
2020-03-19 13:36:33 +01:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-13 11:48:21 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-24 23:44:31 +02:00
2018-11-23 22:58:38 +01:00
2020-06-16 17:38:44 +02:00
2020-07-02 11:26:57 +02:00
2020-06-16 17:38:44 +02:00
2020-06-16 17:38:44 +02:00
2020-07-02 11:26:57 +02:00
2020-06-26 20:27:11 +02:00
2020-06-16 17:38:44 +02:00
2019-07-31 14:15:27 +02:00
2020-08-05 17:38:47 +02:00
2020-06-16 17:38:44 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-03 09:44:18 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-03 09:44:18 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-02 11:26:57 +02:00
2020-07-10 10:57:22 +02:00
2020-07-02 11:26:57 +02:00