Fix coverity scan issues in wolfTPM#463
Merged
dgarske merged 4 commits intowolfSSL:masterfrom Feb 26, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Addresses multiple Coverity findings by tightening bounds checking and improving error handling/logging in wolfTPM and example utilities.
Changes:
- Guard debug logging and improve Linux read failure diagnostics.
- Add key-size validation checks in TPM parameter encryption/decryption helpers.
- Add bounds checks and propagate hashing / file-loaded data validation errors in examples.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tpm2_wrap.c | Wraps init failure printf with DEBUG_WOLFTPM guard. |
| src/tpm2_param_enc.c | Adds source key-size validation to prevent key buffer overruns. |
| src/tpm2_linux.c | Simplifies read error handling and logs ret with errno. |
| examples/pcr/extend.c | Starts checking hash API return codes during PCR extend digest creation. |
| examples/attestation/make_credential.c | Adds object name size bounds check before copy. |
| examples/attestation/activate_credential.c | Adds credential blob/secret bounds checks after reading from file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dgarske
requested changes
Feb 26, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dgarske
requested changes
Feb 26, 2026
dgarske
approved these changes
Feb 26, 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.
Fix 900688, 900687, 900686, 900685, 900676, 900675, 900674, 900673, 900672, and 900671