device: fix attestation report size#116
Merged
swlynch99 merged 2 commits intorust-nvml:mainfrom Dec 8, 2025
Merged
Conversation
Currently we do not account for the size of the attestation reports when moving them from the C struct to the Rust struct. This results in many zeros being included at the end of the report. Since the size of each report is provided, use this to copy only the bytes which contain the report. Signed-off-by: Tobin Feldman-Fitzthum <tfeldmanfitz@nvidia.com>
We are ignoring the size of the attestation reports and indiscriminately exposing the entire buffer. Instead, truncate the reports based on the report length. Signed-off-by: Tobin Feldman-Fitzthum <tfeldmanfitz@nvidia.com>
jorgeantonio21
approved these changes
Nov 21, 2025
Contributor
|
Thanks! I should hopefully have a new release out today or tomorrow. |
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.
Currently we do not account for the size of the attestation reports when moving them from the C struct to the Rust struct. This results in many zeros being included at the end of the report.
Since the size of each report is provided, use this to include only the bytes which contain the report.
Also, do the same thing for the cert chains, although the cert chain format is a little more resilient to trailing characters.
cc @jorgeantonio21