Repository navigation
tpm2: Check for non-NULL entry in ExpDCacheFind - #657
Conversation
In ExpDCacheFind(), the search loop calls BN_cmp(ExpDCache[i].P, P) on every cache entry without checking if the slot is populated. In empty or cleared cache slots, ExpDCache[i].D and ExpDCache[i].P are NULL. Check ExpDCache[i].D != NULL before comparing key parameters, matching the convention in ExpDCacheIncrementAge(). Co-authored-by: IBM Bob <noreply@ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
In ExpDCacheFind(), the search loop calls BN_cmp(ExpDCache[i].P, P) on every cache entry without checking if the slot is populated. In empty or cleared cache slots, ExpDCache[i].D and ExpDCache[i].P are NULL.
Check ExpDCache[i].D != NULL before comparing key parameters, matching the convention in ExpDCacheIncrementAge().
Summary by CodeRabbit