tpm2-tss icon indicating copy to clipboard operation
tpm2-tss copied to clipboard

Inconsistency caused by Esys_TR_FromTPMPublic

Open JuergenReppSIT opened this issue 3 years ago • 1 comments

Several ESYS objects with the same TPM handle with the function Esys_TR_FromTPMPublic. Some ESYS functions e.g. Esys_NV_Write update the internal meta for the object referenced by the passed ESYS handle. The consequence is that there might be objects with NW_WRITTEN set and NV_WRITTEN not set. This caused an error in the TPM tools described in https://github.com/tpm2-software/tpm2-tools/issues/2846. So all objects with the same TPM handle should be updated to avoid inconsistencies. Also for changing the auth values such an update might be needed.

JuergenReppSIT avatar Oct 07 '21 10:10 JuergenReppSIT

@AndreasFuchsTPM what about this one for 3.3?

williamcroberts avatar Jul 15 '22 18:07 williamcroberts

@JuergenReppSIT is this fixed and can be closed? I see a lot of commit descriptions as "addresses" is that just a partial fix or does it fix the whole thing?

williamcroberts avatar Oct 31 '22 19:10 williamcroberts

I have to questions:

  1. Is the fix in tss 3.0, 3.1 and 3.2? or just 3.2? I am using Debian 11 that includes tss 3.0.3, and looking for the fix in that branch.
  2. Does the fix make the tools fix obsolete? Or do we need a combination of tools and tss fix?

gfrankliu avatar Nov 01 '22 20:11 gfrankliu

I have to questions:

  1. Is the fix in tss 3.0, 3.1 and 3.2? or just 3.2? I am using Debian 11 that includes tss 3.0.3, and looking for the fix in that branch.
  • merged: master: 6c88eea 3.2.x: 9239184

They are currently not released. Master is slated to be the upcoming 4.0 release and 3.2.x should be 3.2.1 release offhand.

  1. Does the fix make the tools fix obsolete? Or do we need a combination of tools and tss fix?

We could probably check the ESAPI version when building and compile out the patch, github.com/tpm2-software/tpm2-tools/pull/2847, but considering that that the tools CI runs against master and it works, I see no issues other than performance caused by always doing this.

williamcroberts avatar Nov 01 '22 20:11 williamcroberts

I can mark this as closed after investigating this, but will open a bug on tpm2-tools to compile that out. See tpm2-tools bug https://github.com/tpm2-software/tpm2-tools/issues/3156 so we don't forget about it.

williamcroberts avatar Nov 01 '22 20:11 williamcroberts

@williamcroberts Thank you for the investigation and closing the issue.

JuergenReppSIT avatar Nov 02 '22 09:11 JuergenReppSIT