Fix v185 fwtpm complaince issue with auth entry - #566
Merged
dgarske merged 1 commit intoAug 10, 2026
Conversation
aidangarske
commented
Aug 10, 2026
Member
There was a problem hiding this comment.
Pull request overview
This PR addresses fwTPM v185 compliance issue F-9186 by ensuring that TPM_ST_SESSIONS commands that require authorization cannot omit required authorization sessions, and adds a unit test to prevent regressions.
Changes:
- Enforce
TPM_RC_AUTH_MISSINGwhen aTPM_ST_SESSIONScommand provides fewer auth sessions than the command’s declaredauthHandleCnt. - Add a unit test that constructs a
TPM_ST_SESSIONSTPM2_Clearcommand withauthAreaSz = 0and validates the expected rejection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/fwtpm_unit_tests.c | Adds a regression test for rejecting TPM_ST_SESSIONS commands with an empty auth area when an auth handle is present. |
| src/fwtpm/fwtpm_command.c | Adds an explicit auth-entry-count check to return TPM_RC_AUTH_MISSING when required auth entries are missing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #566
Scan targets checked: wolftpm-bugs, wolftpm-src
Findings: 4
4 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
aidangarske
force-pushed
the
fenrir-9186-auth-bypass-zero-authsize
branch
from
August 10, 2026 17:03
a1b1357 to
10d0075
Compare
aidangarske
marked this pull request as ready for review
August 10, 2026 17:05
dgarske
approved these changes
Aug 10, 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.