Gilles Peskine a6b2f60b4c Fix double free in psa_generate_key when psa_generate_random fails
When psa_generate_random fails, psa_generate_key_internal frees the
key buffer but a the pointer to the now-freed buffer in the slot. Then
psa_generate_key calls psa_fail_key_creation which sees the pointer
and calls free() again.

This bug was introduced by ff5f0e7221d54e5a11db13c5198093a6b6bf4d53
"Implement atomic-creation psa_{generate,generator_import}_key" which
changed how psa_generate_key() cleans up on errors. I went through the
code and could not find a similar bug in cleanup on an error during
key creation.

Fix #207
2019-08-07 13:43:09 +02:00
..
2019-02-19 17:59:00 +00:00
2019-04-02 10:07:28 -07:00
2019-02-19 17:59:00 +00:00
2019-02-19 17:59:00 +00:00
2019-04-30 16:47:36 +01:00
2019-02-19 17:59:00 +00:00
2019-03-11 16:46:20 +00:00
2015-09-04 14:21:07 +02:00
2019-02-19 17:59:00 +00:00
2019-02-19 17:59:00 +00:00