Skip to content

device: fix attestation report size#116

Merged
swlynch99 merged 2 commits intorust-nvml:mainfrom
fitzthum:fix-cc-report-size
Dec 8, 2025
Merged

device: fix attestation report size#116
swlynch99 merged 2 commits intorust-nvml:mainfrom
fitzthum:fix-cc-report-size

Conversation

@fitzthum
Copy link
Copy Markdown
Contributor

@fitzthum fitzthum commented Nov 18, 2025

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

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>
@swlynch99 swlynch99 merged commit 30c6647 into rust-nvml:main Dec 8, 2025
7 checks passed
@swlynch99
Copy link
Copy Markdown
Contributor

Thanks! I should hopefully have a new release out today or tomorrow.

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