Skip to content

Commit a251d20

Browse files
committed
F-2968 - https://fenrir.wolfssl.com/finding/2968 - Add ForceZero on auth in wolfTPM2_HmacStart on all exit paths
1 parent de6599b commit a251d20

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/tpm2_wrap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,6 +6919,7 @@ int wolfTPM2_HmacStart(WOLFTPM2_DEV* dev, WOLFTPM2_HMAC* hmac,
69196919
printf("TPM2_HMAC_Start failed 0x%x: %s\n", rc,
69206920
TPM2_GetRCString(rc));
69216921
#endif
6922+
TPM2_ForceZero(&in.auth, sizeof(in.auth));
69226923
return rc;
69236924
}
69246925

@@ -6930,6 +6931,7 @@ int wolfTPM2_HmacStart(WOLFTPM2_DEV* dev, WOLFTPM2_HMAC* hmac,
69306931
(word32)out.sequenceHandle);
69316932
#endif
69326933

6934+
TPM2_ForceZero(&in.auth, sizeof(in.auth));
69336935
return rc;
69346936
}
69356937

0 commit comments

Comments
 (0)