mirror of https://github.com/wolfSSL/wolfTPM.git
F-13530 - Guard the encrypted salt zeroization against a NULL buffer
parent
022fe8409d
commit
d679f5bec5
|
|
@ -10596,7 +10596,13 @@ static TPM_RC FwCmd_StartAuthSession(FWTPM_CTX* ctx, TPM2_Packet* cmd,
|
|||
FwFreeSession(sess);
|
||||
}
|
||||
TPM2_ForceZero(salt, sizeof(salt));
|
||||
#ifdef WOLFTPM_SMALL_STACK
|
||||
if (encSalt != NULL) {
|
||||
TPM2_ForceZero(encSalt, FWTPM_MAX_PUB_BUF);
|
||||
}
|
||||
#else
|
||||
TPM2_ForceZero(encSalt, FWTPM_MAX_PUB_BUF);
|
||||
#endif
|
||||
FWTPM_FREE_BUF(encSalt);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue