tpm2-tss: tcti-device not working with swtpm-cuse (Updated by maintainer; see later posts)
Hey all,
I had upgraded the tpm2-tss package from 2.4.1
to 3.0.1
to use FAPI. Fapi_Initialize
internally calls Esys_GetCapability
but im facing issues while getting capabilities. I did some analysis on the code and enabled few debugs to narrow down the root cause. From the excerpt of the output given below… Few scenarios can be observed
- when
Tss2_MU_TPMS_CAPABILITY_DATA_Unmarshal
is calledTss2_MU_UINT32_Unmarshal
is getting called. Not sure why this happens and I could only find the declaration ofTss2_MU_TPMS_CAPABILITY_DATA_Unmarshal
intss2_mu.h
but couldnt find its definition. - Though the
Tss2_MU_UINT32_Unmarshal
function returns success, when its returned inTss2_Sys_GetCapability_Complete
the value changes to0x900b
- Additionally though the size of
TPMS_CAPABILITY_DATA
is 1032… sinceTss2_MU_UINT32_Unmarshal
is called, the size of the type there is 4 due toUINT32
Tpm2-tss - 3.0.1
./tools/tpm2_getcap handles-nv-index
…
…
ERROR:marshal:src/tss2-mu/base-types.c:172:Tss2_MU_UINT8_Unmarshal() size of type: 1
ERROR:marshal:src/tss2-mu/base-types.c:172:Tss2_MU_UINT8_Unmarshal() offset non-NULL, initial value: 10
ERROR:marshal:src/tss2-mu/base-types.c:172:Tss2_MU_UINT8_Unmarshal() Unmarshaling UINT8 from 0x5591dd669e70 to buffer 0x7ffd9ea9abbf at index 0xa
ERROR:marshal:src/tss2-mu/base-types.c:172:Tss2_MU_UINT8_Unmarshal() offset parameter non-NULL, updated to 11
ERROR:marshal:src/tss2-mu/base-types.c:172:Tss2_MU_UINT8_Unmarshal() Going to return success 0
ERROR:pranav:src/tss2-sys/api/Tss2_Sys_GetCapability.c:79:Tss2_Sys_GetCapability_Complete() Tss2_MU_UINT8_Unmarshal success 0
ERROR:pranav:src/tss2-sys/api/Tss2_Sys_GetCapability.c:80:Tss2_Sys_GetCapability_Complete() cap size 1032
ERROR:marshal:src/tss2-mu/base-types.c:176:Tss2_MU_UINT32_Unmarshal() size of type: 4
ERROR:marshal:src/tss2-mu/base-types.c:176:Tss2_MU_UINT32_Unmarshal() offset non-NULL, initial value: 11
ERROR:marshal:src/tss2-mu/base-types.c:176:Tss2_MU_UINT32_Unmarshal() Unmarshaling UINT32 from 0x5591dd669e70 to buffer 0x5591dd679d30 at index 0xb
ERROR:marshal:src/tss2-mu/base-types.c:176:Tss2_MU_UINT32_Unmarshal() offset parameter non-NULL, updated to 15
ERROR:marshal:src/tss2-mu/base-types.c:176:Tss2_MU_UINT32_Unmarshal() Going to return success 0
ERROR:pranav:src/tss2-sys/api/Tss2_Sys_GetCapability.c:85:Tss2_Sys_GetCapability_Complete() Tss2_MU_TPMS_CAPABILITY_DATA_Unmarshal returned 9000b
ERROR:esys:src/tss2-esys/api/Esys_GetCapability.c:329:Esys_GetCapability_Finish() Received error from SAPI unmarshaling ErrorCode (0x0009000b)
ERROR:esys:src/tss2-esys/api/Esys_GetCapability.c:107:Esys_GetCapability() Esys Finish ErrorCode (0x0009000b)
ERROR: Esys_GetCapability(0x9000B) - mu:A parameter has a bad value
ERROR: Unable to run ./tools/tpm2_getcap
Let me know if additional information is required.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- man: add vtpm example in tss2-tcti-swtpm Per the discussion in bug #918, add the virtual tpm driver example and discourage use of the CUSE interface. Fixes: https://github.com/tpm2-software/tpm2-tss... — committed to williamcroberts/tpm2-tss by deleted user 3 years ago
- man: add vtpm example in tss2-tcti-swtpm Per the discussion in bug #918, add the virtual tpm driver example and discourage use of the CUSE interface. Fixes: https://github.com/tpm2-software/tpm2-tss... — committed to williamcroberts/tpm2-tss by deleted user 3 years ago
- man: add vtpm example in tss2-tcti-swtpm Per the discussion in bug #918, add the virtual tpm driver example and discourage use of the CUSE interface. Fixes: https://github.com/tpm2-software/tpm2-tss... — committed to tpm2-software/tpm2-tss by deleted user 3 years ago
- Upgrade to version 3.2.0-rc1 (#4) * Dockerfile: delete Remove this dockerfile as it's no longer used nor supported. See the project https://github.com/tpm2-software/tpm2-software-container for D... — committed to trusslab/octopos_tpm2_tss by imcmy 2 years ago
- Update to TSS version 2.3.0 from upstream * Dockerfile: delete Remove this dockerfile as it's no longer used nor supported. See the project https://github.com/tpm2-software/tpm2-software-containe... — committed to trusslab/octopos_tpm2_tss by imcmy 2 years ago
I would NOT use swtm-cuse anymore. I would do the following instead: