Skip to content

Fix v185 fwtpm complaince issue with auth entry - #566

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:fenrir-9186-auth-bypass-zero-authsize
Aug 10, 2026
Merged

Fix v185 fwtpm complaince issue with auth entry#566
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:fenrir-9186-auth-bypass-zero-authsize

Conversation

@aidangarske

Copy link
Copy Markdown
Member
F-9186

@aidangarske aidangarske self-assigned this Aug 10, 2026
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_MISSING when a TPM_ST_SESSIONS command provides fewer auth sessions than the command’s declared authHandleCnt.
  • Add a unit test that constructs a TPM_ST_SESSIONS TPM2_Clear command with authAreaSz = 0 and 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 wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/fwtpm/fwtpm_command.c
Comment thread tests/fwtpm_unit_tests.c
Comment thread src/fwtpm/fwtpm_command.c
Comment thread tests/fwtpm_unit_tests.c
@aidangarske
aidangarske force-pushed the fenrir-9186-auth-bypass-zero-authsize branch from a1b1357 to 10d0075 Compare August 10, 2026 17:03
@aidangarske
aidangarske requested a review from dgarske August 10, 2026 17:05
@aidangarske
aidangarske marked this pull request as ready for review August 10, 2026 17:05
@dgarske dgarske self-assigned this Aug 10, 2026
@dgarske
dgarske merged commit 56d4e48 into wolfSSL:master Aug 10, 2026
236 of 240 checks passed
@aidangarske
aidangarske deleted the fenrir-9186-auth-bypass-zero-authsize branch August 10, 2026 23:15
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.

4 participants