libtomcrypt
libtomcrypt copied to clipboard
An improper locking bug(e.g., deadlock) on the lock ltc_ecc_fp_lock
Hi, developers, thank you for your checking. It seems the lock ltc_ecc_fp_lock is not released correctly when cache_entry == NULL in the function ltc_ecc_fp_save_state?
https://github.com/libtom/libtomcrypt/blob/673f5ce29015a9bba3c96792920a10601b5b0718/src/math/fp/ltc_ecc_fp_mulmod.c#L1412-L1433
Hi, developers @sjaeckel @fperrad @karel-m
Any comments would be highly appreciated. Thank you.
Best Regards,
btw. referring to https://github.com/OP-TEE/optee_os/pull/4842 would have been nice :)
looks fine, I'll apply the patch you posted to optee
@sjaeckel Thanks~
Can you please check whether #626 correctly fixes this?
It looks good to me.