Open akorb opened 1 year ago
@akorb please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:
- (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
- (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"
@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
).