Skip to contentSkip to conversation

Clearing TPM

tpm2 burnsds.accounts at protonmail.com 3 participants 8 messages Sep 30, 2022 – Oct 5, 2022

lore
Share & tools
lore

burnsds.accounts at protonmail.com

#0 lore raw

I am working a Linux IoT integration with TPM 2.0 and want to write a provisioning script for ensuring the TPM is setup consistently on the device. The script uses tpm2_clear and tpm2_changeauth. Some of my devices show the following error message when calling tpm2_clear:

dhub(a)dhub336:~$ sudo tpm2_clear
[sudo] password for dhub:
WARNING:esys:src/tss2-esys/api/Esys_Clear.c:291:Esys_Clear_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Clear.c:97:Esys_Clear() Esys Finish ErrorCode (0x00000921)
ERROR: Esys_Clear(0x921) - tpm:warn(2.0): authorizations for objects subject to DA protection are not allowed at this time because the TPM is in DA lockout mode
ERROR: Unable to run tpm2_clear

This makes me nervous as some of the devices need to be provisioned in the field. Why is the DA lockout preventing me from clearing the TPM? This is occurring on a NUC10 where the TPM is implemented in the PTT.

Thanks,
Dan Burns

#1 lore raw
Quoted 16 lines · burnsds.accounts(a)protonmail.com

I am working a Linux IoT integration with TPM 2.0 and want to write a provisioning script for ensuring the TPM is setup consistently on the device. The script uses tpm2_clear and tpm2_changeauth. Some of my devices show the following error message when calling tpm2_clear:

dhub(a)dhub336:~$ sudo tpm2_clear
[sudo] password for dhub:
WARNING:esys:src/tss2-esys/api/Esys_Clear.c:291:Esys_Clear_Finish()
Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Clear.c:97:Esys_Clear() Esys Finish
ErrorCode (0x00000921)
ERROR: Esys_Clear(0x921) - tpm:warn(2.0): authorizations for objects
subject to DA protection are not allowed at this time because the TPM
is in DA lockout mode
ERROR: Unable to run tpm2_clear
Quoted 4 lines

This makes me nervous as some of the devices need to be provisioned in the field. Why is the DA lockout preventing me from clearing the TPM? This is occurring on a NUC10 where the TPM is implemented in the PTT.

Something has gotten auth wrong enough times on a DA protected object to trigger DA lockout. Why, I can't tell you. You'd have to investigate the reason it got into that state. tpm2_dictionarylockout -c will clear it and requires owner or lockout password.

Quoted 7 lines

Thanks,
Dan Burns
_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

#2 lore raw

Is there any way to get out of this state without the lockout password?

#3 lore raw
Quoted 2 lines · burnsds.accounts(a)protonmail.com

Is there any way to get out of this state without the lockout password?

Platform auth, which you won't have as its typically randomly set by the OS on boot or you can use the bios settings to clear an Intel or AMD based TPM. For discrete TPMs you need to consult their manuals. Typically, its playing with some jumpers.

Quoted 4 lines

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

#4 lore raw

Also there's the Physical Presence Interface if your device supports it. You echo a number representing the type of reset you want to the sysfs path at /sys/class/tpm/tpm0/ppi/request, read out the success or failure at /sys/class/tpm/tpm0/ppi/response and reboot. The BIOS then uses it's platform authority to issue a clear, usually after prompting you to press some key to indicate you're at the console and agree.

For example:
$echo 5 > /sys/class/tpm/tpm0/ppi/request
$reboot

Quoted 19 lines · William C
Quoted 2 lines · burnsds.accounts(a)protonmail.com

Is there any way to get out of this state without the lockout password?

Platform auth, which you won't have as its typically randomly set by the OS on boot or you can use the bios settings to clear an Intel or AMD based TPM. For discrete TPMs you need to consult their manuals. Typically, its playing with some jumpers.

Quoted 4 lines

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

#5 lore raw

Wow this is really helpful. Do you know if the request values are vendor specific? It would be nice to know what the different values mean.

Thanks,
Dan

------- Original Message -------

Quoted 26 lines · Steven Clark

Also there's the Physical Presence Interface if your device supports it. You echo a number representing the type of reset you want to the sysfs path at /sys/class/tpm/tpm0/ppi/request, read out the success or failure at /sys/class/tpm/tpm0/ppi/response and reboot. The BIOS then uses it's platform authority to issue a clear, usually after prompting you to press some key to indicate you're at the console and agree.

For example:
$echo 5 > /sys/class/tpm/tpm0/ppi/request
$reboot

Quoted 18 lines · William C
Quoted 2 lines · burnsds.accounts(a)protonmail.com

Is there any way to get out of this state without the lockout password?

Platform auth, which you won't have as its typically randomly set by the OS on boot or you can use the bios settings to clear an Intel or AMD based TPM. For discrete TPMs you need to consult their manuals. Typically, its playing with some jumpers.

Quoted 4 lines

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

#6 lore raw

The codes are defined in Table 2 of the document "TCG PC Client Platform Physical Presence Interface Specification" which you can find on the
Trusted Computing Group website. 5 is defined as Clear

Quoted 45 lines · accounts

Wow this is really helpful. Do you know if the request values are vendor specific? It would be nice to know what the different values mean.

Thanks,
Dan

------- Original Message -------
On Friday, September 30th, 2022 at 4:07 PM, Steven Clark < davolfman(a)gmail.com> wrote:

Also there's the Physical Presence Interface if your device supports it. You echo a number representing the type of reset you want to the sysfs path at /sys/class/tpm/tpm0/ppi/request, read out the success or failure at /sys/class/tpm/tpm0/ppi/response and reboot. The BIOS then uses it's platform authority to issue a clear, usually after prompting you to press some key to indicate you're at the console and agree.

For example:
$echo 5 > /sys/class/tpm/tpm0/ppi/request
$reboot

Quoted 19 lines · William C
Quoted 2 lines · burnsds.accounts(a)protonmail.com

Is there any way to get out of this state without the lockout password?

Platform auth, which you won't have as its typically randomly set by the OS on boot or you can use the bios settings to clear an Intel or AMD based TPM. For discrete TPMs you need to consult their manuals. Typically, its playing with some jumpers.

Quoted 4 lines

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

#7 lore raw
In reply to Roberts
Quoted 30 lines · William C
Quoted 22 lines · burnsds.accounts(a)protonmail.com

I am working a Linux IoT integration with TPM 2.0 and want to write a
provisioning script for ensuring the TPM is setup consistently on the
device. The script uses tpm2_clear and tpm2_changeauth. Some of my
devices show the following error message when calling tpm2_clear:

dhub(a)dhub336:~$ sudo tpm2_clear
[sudo] password for dhub:
WARNING:esys:src/tss2-esys/api/Esys_Clear.c:291:Esys_Clear_Finish()
Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Clear.c:97:Esys_Clear() Esys
Finish
ErrorCode (0x00000921)
ERROR: Esys_Clear(0x921) - tpm:warn(2.0): authorizations for
objects
subject to DA protection are not allowed at this time because the
TPM
is in DA lockout mode
ERROR: Unable to run tpm2_clear
Quoted 5 lines

This makes me nervous as some of the devices need to be provisioned in the field. Why is the DA lockout preventing me from clearing the
TPM? This is occurring on a NUC10 where the TPM is implemented in the PTT.

Quoted 6 lines

Something has gotten auth wrong enough times on a DA protected object to trigger DA lockout. Why, I can't tell you. You'd have to investigate
the reason it got into that state. tpm2_dictionarylockout -c will clear
it and requires owner or lockout password.

It was brought to my attention that it requires lockout or platform auth not owner auth. I always get that wrong too. :-p

Quoted 11 lines
Quoted 7 lines

Thanks,
Dan Burns
_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

_______________________________________________
tpm2 mailing list -- tpm2(a)lists.01.org
To unsubscribe send an email to tpm2-leave(a)lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s