Repository navigation
tpm2: Fix memory leak of private exponent D in ComputePrivateExponentD - #655
Conversation
When the Carmichael-computed private exponent D is too small, the code falls back to the Euler computation, which assigns a newly allocated BIGNUM to *D and thereby leaks the one allocated by the Carmichael computation. Free the first D (clearing it since it is secret) and reset the pointer before falling back. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
CodeRabbit Verify cannot start because this repository is not enabled for PR Verify. Enable PR testing in Verify settings. CodeRabbit Verify can be triggered again using the |
When the Carmichael-computed private exponent D is too small, the code falls back to the Euler computation, which assigns a newly allocated BIGNUM to *D and thereby leaks the one allocated by the Carmichael computation. Free the first D (clearing it since it is secret) and reset the pointer before falling back.
Summary by CodeRabbit