Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpm_setup_rsp_auth needs fall-thru not break #48

Open
jandryuk opened this issue Jun 18, 2020 · 1 comment
Open

tpm_setup_rsp_auth needs fall-thru not break #48

jandryuk opened this issue Jun 18, 2020 · 1 comment

Comments

@jandryuk
Copy link

I wrote this as a comment here 88393fa#r40001028, but figured I should open an actual issue.

88393fa added a break to quiet an implicit-fallthrough warning. I think this is actually a desired fall though since auth1 is expected to be set when auth2 is set.

Xen changed to to mark the fall-thru, but I'm not sure if it has been tested: https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=stubdom/vtpm-implicit-fallthrough.patch;h=db97be552f035871381d2b97b4101a946c8915d0;hb=HEAD ?

https://trustedcomputinggroup.org/wp-content/uploads/TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf shows that auth2 is always set when auth1 is set, except for TPM_Ord_ChangeAuth.

@lbakman
Copy link

lbakman commented May 31, 2023

Just following up on an old issue.

I have been struggeling with getting Tspi_Data_Unseal to work against the TPM emulator today, and this was exactly my problem.

The method authsess_xsap_verify called by Tspi_Data_Unseal (tspi_seal.c:188) would fail and cause a return code 0x1.

Commenting out the "break;" introduced in tpm_marshalling.c:588 solves the problem for me.

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

No branches or pull requests

2 participants