F-4742 fix and test case#517
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes Fenrir report 4742 by tightening fwTPM’s TPM2_PolicyAuthorize ticket handling: a NULL (zero-length) verification ticket is now rejected for real policy sessions while remaining permitted for trial sessions, and a regression test is added to lock in the behavior.
Changes:
- Update
FwCmd_PolicyAuthorizeto rejectTPMT_TK_VERIFIED.digest.size == 0when the session isTPM_SE_POLICY. - Keep the NULL-ticket path working for
TPM_SE_TRIALsessions (policy-digest computation use case). - Add a unit test that asserts rejection on policy sessions and acceptance on trial sessions; ignore the unit-test NV backing file.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/fwtpm/fwtpm_command.c |
Enforces non-NULL verification tickets for real policy sessions while preserving trial-session behavior. |
tests/fwtpm_unit_tests.c |
Adds a regression test covering NULL-ticket PolicyAuthorize for both policy and trial sessions. |
.gitignore |
Ignores the fwTPM unit test NV file (fwtpm_test_nv.bin). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aidangarske
approved these changes
Jun 1, 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.
Addresses Fenrir report 4742 in the fwTPM policy handling, with an added regression test.