Searched hist:"0 b38353cb066899d09b926b7c87e29cecfc83f1c" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/lib/libtomcrypt/ |
| H A D | sm2-dsa.c | 0b38353cb066899d09b926b7c87e29cecfc83f1c Thu Jan 09 09:43:42 UTC 2020 Jerome Forissier <jerome@forissier.org> core: ltc: SM2 DSA: fix bignum memory leaks
crypto_acipher_sm2_dsa_sign() and crypto_acipher_sm2_dsa_verify() leak some bignum memory due to missing calls to ecc_free(). This is all the more problematic that bignum allocations use a special memory pool [1] that can easily cause deadlocks when misused.
This commit adds the missing calls.
[1] Commit a2eb5b55d169 ("libutils: add mempool API")
Fixes: 76c7ba4b9ff7 ("core: ltc: add support for SM2 DSA") Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|