Repository navigation
Align more fwTPM response codes with the reference and persist public-only objects in v1.85 builds - #686
Merged
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #686
Scan targets checked: wolftpm-src, wolftpm-bugs
Not reviewed (no scan target covers them): docs/fwtpm/overview.md
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
aidangarske
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A second pass over fwTPM behavior that differed from the TPM 2.0 reference implementation, after #685. One commit per difference. Each was checked against the reference simulator.
Response codes:
TPM_RC_VALUEwith the handle number. This covers the hierarchy, provision, clear, lockout and PCR handles ofTPM2_EvictControl,TPM2_Clear,TPM2_ClearControl,TPM2_ChangeEPS,TPM2_ChangePPS,TPM2_HierarchyControl,TPM2_HierarchyChangeAuth,TPM2_SetPrimaryPolicy,TPM2_CreatePrimary,TPM2_ClockSet, the dictionary attack commands, the PCR commands and the NV define and undefine commands.TPM2_Create,TPM2_CreateLoadedandTPM2_CreatePrimaryreport the parameter number for an object attribute error.TPM2_PolicySignedchecks cpHashA and the signature scheme before the signature, and refuses a null or non-signing sigAlg in a trial session too.TPM_RC_CPHASH, whichever command recorded it.Behavior:
TPM2_CreatePrimaryaccepts sensitive data together with sensitiveDataOrigin for a key and takes the data into the derivation.TPM2_DictionaryAttackParameterskeeps the failed tries counter.TPM2_EvictControlpersists an object loaded with only its public area in a--enable-v185build, as Part 3 version 185 allows. Other builds still refuse it. A policy session on such a persistent object returnsTPM_RC_AUTH_UNAVAILABLE.Compatibility:
TPM_RC_HIERARCHY,TPM_RC_AUTH_TYPE,TPM_RC_VALUEorTPM_RC_ATTRIBUTEScodes for these cases must mask the handle or parameter bits.TPM2_DictionaryAttackParametersto clear the counter needsTPM2_DictionaryAttackLockReset.Resolves F-16137