tpm_restrictsrk -z fails with "Authentication failed" and I'm never prompted for any password. Is it a bug or just something I failed to grasp?
Platform: OpenSuse 15.4
trousers: 0.3.15
tpm-tools 1.3.9.2
```
# tpm_restrictsrk -z -l debug
Tspi_Context_Create success
Tspi_Context_Connect success
Tspi_Context_GetTpmObject success
Tspi_GetPolicyObject success
Tspi_Policy_SetSecret success
Tspi_TPM_SetStatus failed: 0x00000001 - layer=tpm, code=0001 (1), Authentication failed
Tspi_Context_FreeMemory success
Tspi_Context_Close success
```
I don't know what this command does, but the error message implies a bad authorization value. -z says to use all zeros as the authorization value. Perhaps the authorization value is not all zeros.
If you use a SW TPM, it will dump internal operations and help you / us debug.
Oops. My mistake. I had the impression that the -z flag to this command would reset the SRK password to all zeros. Not so.
tpm_changeownerauth -s -rresets the SRK password. Help text for tpm_restrictsrk as below:See also release 1.3.1 text
Close this bug ticket at will ...
Although ... the command
tpm_restrictsrk -aactually seems non-working:I expected the SRK readable without owner auth (with SRK auth) after successful
tpm_restrictsrk -aMy TPM chip is SLB9660:
Last edit: Oskar Enoksson 2023-11-01
I don't know the implementation of tpm_restrictsrk . It's not a TPM command.
At a high level, there is a flag readSRKPub which permits an unauthorized read of the SRK. Once clear, it needs owner auth.
TPM 1.2 is old and obsolete, so you may not get any other responses. If you can use a SW TPM and send me the traces (email), I can see what the command is doing and why it's failing.