You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fwTPM: TPM_CAP_TPM_PROPERTIES leaves out fixed properties, including TPM_PT_CONTEXT_SYM_SIZE #651
TPM2_GetCapability(TPM_CAP_TPM_PROPERTIES, TPM_PT_FIXED, ...) returns 19 fixed properties. It leaves out, among others:
TPM_PT_VENDOR_TPM_TYPE (0x10a);
TPM_PT_HR_TRANSIENT_MIN, TPM_PT_HR_PERSISTENT_MIN, TPM_PT_HR_LOADED_MIN and TPM_PT_ACTIVE_SESSIONS_MAX (0x10e–0x111);
TPM_PT_PCR_SELECT_MIN (0x113) and TPM_PT_CONTEXT_GAP_MAX (0x114);
TPM_PT_NV_COUNTERS_MAX through TPM_PT_ORDERLY_COUNT (0x116–0x11d), which includes TPM_PT_CONTEXT_SYM and TPM_PT_CONTEXT_SYM_SIZE;
TPM_PT_MAX_OBJECT_CONTEXT, TPM_PT_MAX_SESSION_CONTEXT and the TPM_PT_PS_* properties (0x121–0x128).
The TCG reference implementation and libtpms report every fixed property, and clients read them:
tpm2-pkcs11 sizes AES keys from TPM_PT_CONTEXT_SYM_SIZE, so without it every AES key generation or import is refused.
Clients that index the reply by offset from TPM_PT_FIXED, as tpm2-pkcs11's C_GetTokenInfo did, read the wrong values once one is missing (here, everything after 0x10a moves up by one).
Resource managers use TPM_PT_HR_*_MIN and TPM_PT_ACTIVE_SESSIONS_MAX.
Reproduction. Call Esys_GetCapability(TPM2_CAP_TPM_PROPERTIES, TPM2_PT_FIXED, TPM2_MAX_TPM_PROPERTIES) and list the tags:
Suggested fix. Report the remaining fixed properties from the build's limits (FWTPM_MAX_OBJECTS, the session and NV limits, the context-protection algorithm and its key size: AES and 128 or 256 bits). TPM_PT_CONTEXT_SYM_SIZE matters most for clients.
Environment
wolfTPM master at d7f73b5 (also seen in v4.2.0), fwTPM built with ./configure --enable-fwtpm-only --enable-swtpm on wolfSSL v5.9.4-stable (--enable-wolftpm --enable-pkcallbacks --enable-keygen).
fwtpm_server --port 2341 --platform-port 2342, reached through the tpm2-tss 4.2.0 swtpm TCTI (swtpm:host=127.0.0.1,port=2341).
For comparison, the same program against swtpm 0.10.2 (libtpms).
Activity
dgarske commentedon Oct 28, 2026
Hi @AlexLaroche thank you for all the reports. Can you review and try out the fixes in #656 ?
Thanks, David Garske, wolfSSL