The latest tpm2-tools 5.8 release addresses three GitHub security advisories. One is a heap overflow in tpm2_getekcertificate, and the other is an out-of-bounds write that happens when too many sessions are in use. I don’t have information on the third advisory. Beyond the fixes, 5.8 extends EK certificate handling. It adds the option to read EK certificates from NV RAM, introduces new EK templates and supports a marshaled quote format. https://github.com/tpm2-software/tpm2-tools/releases/tag/5.8
Hi All, I’m working in the EDK2 UEFI environment using an ST33 TPM 2.0 chip. In the preboot environment, I’m...
Hi All,
I’m working in the EDK2 UEFI environment using an ST33 TPM 2.0 chip.
In the preboot environment, I’m trying to seal and unseal data using a PCR policy (PCR[6]). Below is a summary of my observations:
⸻
Sealing Flow (Working):
1. Read PCR[6] using ReadPcr().
2. Passed the PCR digest to PolicyPCR().
3. Called GetDigest() to obtain the policy digest.
4. Used the resulting digest as the authPolicy while creating the sealed object (via TPM2_Create).
5. Sealing was successful; I obtained valid public/private blobs.
Loading (Working):
• I successfully loaded the sealed object using TPM2_Load.
⸻
Unsealing Flow (Failing Case):
1. Started a policy session.
2. Read PCR[6] using ReadPcr().
3. Passed the PCR digest to PolicyPCR() → Got error 0x1C4 (TPM_RC_VALUE).
4. Tried passing NULL as digest to PolicyPCR() instead.
5. Called Unseal() with the session → Got error 0x99D (TPM_RC_POLICY_FAIL).
⸻
Unsealing Flow (Working Case):
During sealing, if I manually SHA-256 hash the PCR digest returned by ReadPcr(), and pass that into PolicyPCR() and then use GetDigest() → the authPolicy used for sealing.
works during unseal.
Then during unseal:
1. Started a policy session.
2. Called PolicyPCR() with NULL digest.
3. Called Unseal() → Success, data unsealed.
⸻
Question:
Why does computing a SHA-256 hash of the PCR[6] digest during sealing allow unsealing to succeed, whereas using the raw PCR digest directly during PolicyPCR() setup fails?
Is the TPM internally computing the policy digest using SHA256(PCR Digest) and matching it with the authPolicy?
⸻
Any insights or clarifications would be appreciated
I’m working in the EDK2 UEFI environment using an ST33 TPM 2.0 chip.
In the preboot environment, I’m trying to seal and unseal data using a PCR policy (PCR[6]). Below is a summary of my observations:
⸻
Sealing Flow (Working):
1. Read PCR[6] using ReadPcr().
2. Passed the PCR digest to PolicyPCR().
3. Called GetDigest() to obtain the policy digest.
4. Used the resulting digest as the authPolicy while creating the sealed object (via TPM2_Create).
5. Sealing was successful; I obtained valid public/private blobs.
Loading (Working):
• I successfully loaded the sealed object using TPM2_Load.
⸻
Unsealing Flow (Failing Case):
1. Started a policy session.
2. Read PCR[6] using ReadPcr().
3. Passed the PCR digest to PolicyPCR() → Got error 0x1C4 (TPM_RC_VALUE).
4. Tried passing NULL as digest to PolicyPCR() instead.
5. Called Unseal() with the session → Got error 0x99D (TPM_RC_POLICY_FAIL).
⸻
Unsealing Flow (Working Case):
During sealing, if I manually SHA-256 hash the PCR digest returned by ReadPcr(), and pass that into PolicyPCR() and then use GetDigest() → the authPolicy used for sealing.
works during unseal.
Then during unseal:
1. Started a policy session.
2. Called PolicyPCR() with NULL digest.
3. Called Unseal() → Success, data unsealed.
⸻
Question:
Why does computing a SHA-256 hash of the PCR[6] digest during sealing allow unsealing to succeed, whereas using the raw PCR digest directly during PolicyPCR() setup fails?
Is the TPM internally computing the policy digest using SHA256(PCR Digest) and matching it with the authPolicy?
⸻
Any insights or clarifications would be appreciated
❤️
👍
💡
👏
😂
Explore More Posts
Sneak-peak at our #TPMDEV2026 Conference. One slide from each main talk. Expect the recordings soon as we are migrating to Youtube. The news from today is that we are resuming our monthly calls and we will have in-person #TPMDEV2027! Check TPM.dev for more info.
Earlier today we released tpm2-tss 4.2.2 and 4.1.6 with additional security fixes and compatibility improvements. https://github.com/tpm2-software/tpm2-tss/releases This is the third patch release for 4.1.x this year. I am happy we are picking up speed for faster security patches while sharing knowledge on the tpm2-tss release process among the maintainers.




Comments
Start the Conversation
…more
The digest passed to policypcr is not just the digest of a pcr, but is the digest of all the selected pcrs, otherwise it would be impossible to use several pcrs in one call …more