-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
esys: close TR handle for input persistent handle in EvictControl_Finish
The TSS ESAPI spec (1.00 rev 14) says: > If the ESYS_TR object on input was a persistent object, [the ESYS_TR > output] parameter will not return a ESYS_TR object but instead will > return ESYS_TR_NULL. Also the metadata in the ESYS_CONTEXT regarding > the ESYS_TR object will be removed and the ESYS_TR object will be > marked as invalid. However, currently although the output parameter is set to ESYS_TR_NONE, the input ESYS_TR object isn't closed. Other than the obvious leak, this can cause an error when Esys_TR_FromTPMPublic is called twice, with the object having been recreated with different public data and persisted with Esys_EvictControl in between, since Esys_TR_FromTPMPublic now verifies that the public data hasn't changed for the ESYS_TR object (which it now has). Address this by closing the input ESYS_TR handle in the case that it referred to a persistent object. Signed-off-by: Rob Shearman <rob@graphiant.com>
- Loading branch information
1 parent
76afc9b
commit 86949f7
Showing
2 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters