-
Notifications
You must be signed in to change notification settings - Fork 104
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
pkcs11-tool --init core dumps or fails to work second time #563
Comments
The return seems fine, I have set up so you cannot have N tokens with the same name in a TPM2_PKCS11_STORE. I think the abort is in pkcs11-tool. Maybe run it valgrind or a debugger to see where it hits the abort call? I cannot reproduce. |
Debugger output:
|
I see what the problem is. Trying to log into a token (--pin implicitly does a user login) before the user object is set up causes this condition. You need to call inittoken and then |
A coomand like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cuase a C_Login even becuase --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes a NPD when trying to load the user sealobjects public and private blobs. Fixes: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
A comand like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cuase a C_Login even becuase --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes a NPD when trying to load the user sealobjects public and private blobs. Related-to: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
A command like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cause a C_Login event becuase --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes an NPD when trying to load the user sealobjects public and private blobs. Fixes: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
A command like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cause a C_Login event becuase --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes an NPD when trying to load the user sealobjects public and private blobs. Relates-to: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
A command like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cause a C_Login event becuase --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes an NPD when trying to load the user sealobjects public and private blobs. Relates-to: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
A command like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cause a C_Login event because --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes an NPD when trying to load the user sealobjects public and private blobs. Fixes: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
FYI this was fixed on master with aabb304. I have a fix + test on 1.X for 1.3.2 release and a test on master |
Theirs actually second bug in the |
A command like: pkcs11-tool --module /usr/lib/libtpm2_pkcs11.so --init-token --label tpmhsm --so-pin foo --pin bar Will cause a C_Login event because --pin is specified. However, C_InitPIN has not been called to initialize the userpin. This causes an NPD when trying to load the user sealobjects public and private blobs. Fixes: tpm2-software#563 Signed-off-by: William Roberts <william.c.roberts@intel.com>
Environment
Board: APL UPSquared with PTT
OS: Ubuntu 20.04 (opensc 0.20.0-3)
tpm2-tss: 4.2.1 (tarball)
tpm2-pkcs11: 1.3.1 (tarball)
tpm2-tools: Not installed
tpm2-abrmd: Not installed
Error message
The text was updated successfully, but these errors were encountered: