-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fix TA panic in EPS generation #98
base: main
Are you sure you want to change the base?
Conversation
@akorb please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@microsoft-github-policy-service agree |
With the current state of the code, the fTPM TA panics with the following output if
-D USE_PLATFORM_EPS
is specified:This happens because in
_plat__GetEPS
theEPSLen
variable which is passed toTEE_GetPropertyAsBinaryBlock
is not initialized. However,TEE_GetPropertyAsBinaryBlock
expects this variable to be set to the size of the provided buffer, as explained here.It also fixes that the getting the value of the property always failed, since the property is not registered specifically for the fTPM TA, but for the whole TEE here, i.e., use
TEE_PROPSET_TEE_IMPLEMENTATION
instead ofTEE_PROPSET_CURRENT_TA
.In addition, it fixes that we might write out of buffer of the variable
EndorsementSeed
by giving its actual length to_plat__GetEntropy
instead of the fixed EPS size (TEE_EPS_SIZE
).