Repository navigation
Fix fwTPM NV journal integrity and align more fwTPM commands with the reference - #685
Merged
Merged
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #685
Scan targets checked: wolftpm-src, wolftpm-bugs
Not reviewed (no scan target covers them): docs/fwtpm/hal-and-porting.md, docs/fwtpm/overview.md
Coverage: 6 of 7 in-scope changed file(s) opened by the reviewer; not opened: wolftpm/tpm2_wrap.h
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
dgarske
force-pushed
the
fwtpm_nv_refmatch
branch
from
November 30, 2026 20:52
805ab0b to
8513af6
Compare
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.
More fixes from the Fenrir review of the fwTPM, after #682 and #683. One commit per finding. Response codes were checked against the TPM 2.0 reference implementation.
NV journal:
docs/fwtpm/hal-and-porting.mddocuments what a power loss does in each journal mode.Commands:
TPM2_EvictControl: platform authorization can evict an owner-range object, an object with an stClear ancestor is refused, the hierarchy is checked before the handle range, and errors carry the handle or parameter number.TPM2_DictionaryAttackParametersaccepts a newMaxTries of zero, which puts the TPM in lockout.TPM2_PolicySigned,TPM2_PolicySecret,TPM2_PolicyTicketandTPM2_PolicyParameters: parameter numbers on errors, no nonceTPM or cpHashA checks in a trial session, a repeated pHash and an authHandle that is not an entity are refused, and a PolicyTicket timeout of zero does not expire.TPM2_ClockRateAdjustvalidates rateAdjust, andTPM2_NV_DefineSpacereturnsTPM_RC_SIZEfor an oversized dataSize.Compatibility:
A power loss during a journal write can still lose the TPM state; that needs a journal format change and is follow-on work.
Resolves F-17151, F-18887, F-18888, F-18898, F-18943, F-18945, F-18956, F-18957, F-18958, F-18963, F-18964