Skip to content

tpm2: Use marshalled size of OBJECT to see whether it fits into NVRAM#571

Merged
stefanberger merged 1 commit intomasterfrom
master.next
Mar 10, 2026
Merged

tpm2: Use marshalled size of OBJECT to see whether it fits into NVRAM#571
stefanberger merged 1 commit intomasterfrom
master.next

Conversation

@stefanberger
Copy link
Copy Markdown
Owner

@stefanberger stefanberger commented Mar 10, 2026

Use the marshalled size of an OBJECT to check whether it still fits into NVRAM rather than using the size of the OBJECT (sizeof(obj), which is much bigger. Using the marshalled size also handles the case where the OBJECT is still copied into NVRAM using memcpy for the NULL profile case of libtpms v0.9. This should have been converted once NvObjectToBuffer() was started to be called there.

Use the marshalled size of an OBJECT to check whether it still fits into
NVRAM rather than using the size of the OBJECT (sizeof(obj), which is much
bigger. Using the marshalled size also handles the case where the OBJECT is
still copied into NVRAM using memcpy for the NULL profile case of
libtpms v0.9. This should have been converted once NvObjectToBuffer()
was started to be called there.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger mentioned this pull request Mar 10, 2026
2 tasks
@stefanberger stefanberger merged commit 77104fb into master Mar 10, 2026
4 checks passed
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.

1 participant