-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot define NVRAM area with simple permissions #949
Comments
You may need to read the specs: https://trustedcomputinggroup.org/wp-content/uploads/TPM-2.0-1.83-Part-3-Commands.pdf There are required flags that you must set: "At least one of TPMA_NV_PPREAD, TPMA_NV_OWNERREAD, TPMA_NV_AUTHREAD, or TPMA_NV_POLICYREAD shall be SET or the TPM shall return TPM_RC_ATTRIBUTES. If TPMA_NV_CLEAR_STCLEAR is SET, then nvIndexType shall not be TPM_NT_COUNTER or the TPM shall return TPM_RC_ATTRIBUTES. |
But I want it to be readable/writable without needing physical presence, owner authorization, policy validation, or providing "authdata". How can I make it like that? I want to be able to read with a simple |
I am afraid the spec requires that you will have to set one of those flags for reading and writing. If you do not plan on giving the owner hierarchy a password then the read will always work as shown in the following (OWNERREAD/WRITE set implicitly):
|
Is "dropping owner authorization" not a thing in TPM 2.0 like it was in TPM 1.2? |
I am not sure what you are asking. |
An NV index cannot be created with no flags: "At least one of TPMA_NV_PPREAD, TPMA_NV_OWNERREAD, TPMA_NV_AUTHREAD, or TPMA_NV_POLICYREAD shall be SET or the TPM shall return TPM_RC_ATTRIBUTES." The closest you can get to 'nothing' is TPMA_NV_AUTHREAD and TPMA_NV_AUTHWRITE and an Empty Auth. You can then hard code the NULL Auth, 40 00 00 09 00 00 00 00 00. You could create an all zero policy, but that's a bit more work, startauthsession and then specify the policy handle. |
The TPM does not have the concept of optional authorization. If the command requires authorization, it must be present. The closest you can get is a plaintext password session with a zero length password -> the NULL auth. |
Trying to run
tpm2_nvdefine -s 0x1 -a "write_stclear" 0x0
with SWTPM v0.6.3 results in this error:What is inconsistent?
The text was updated successfully, but these errors were encountered: