Skip to content

F-4742 fix and test case#517

Merged
aidangarske merged 1 commit into
wolfSSL:masterfrom
dgarske:fwtpm_sesspolicy
Jun 1, 2026
Merged

F-4742 fix and test case#517
aidangarske merged 1 commit into
wolfSSL:masterfrom
dgarske:fwtpm_sesspolicy

Conversation

@dgarske
Copy link
Copy Markdown
Member

@dgarske dgarske commented Jun 1, 2026

Addresses Fenrir report 4742 in the fwTPM policy handling, with an added regression test.

@dgarske dgarske self-assigned this Jun 1, 2026
Copilot AI review requested due to automatic review settings June 1, 2026 21:48
@dgarske dgarske requested a review from aidangarske June 1, 2026 21:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PolicyAuthorize to reject TPMT_TK_VERIFIED.digest.size == 0 when the session is TPM_SE_POLICY.
  • Keep the NULL-ticket path working for TPM_SE_TRIAL sessions (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.

@dgarske dgarske assigned aidangarske and unassigned dgarske Jun 1, 2026
@dgarske dgarske force-pushed the fwtpm_sesspolicy branch from 688cbe8 to dafb0f6 Compare June 1, 2026 22:57
@aidangarske aidangarske merged commit 3cfbec2 into wolfSSL:master Jun 1, 2026
142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants