You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes an issue with the handling of the nonce field when opening
authentication sessions. The ESYS layer expects either a pointer to a
valid nonce of at least 16 bytes, or NULL if no nonce is provided. Our
handling, however, passed down an invalid pointer that was referencing a
now-defunct structure.
What happened, both before #340 and after, was that the `Nonce` input
was moved into a separate scope, either a `match` or a lambda function,
then converted to `TPM2B_NONCE`. A reference to this `TPM2B_NONCE` was
taken and converted to `*const TPM2B_NONCE`, which was passed outside of
the scope. The pointer, therefore, ended up referencing a structure that
was dropped at the end of that inner scope.
To ensure memory safety, we need to keep ownership of the `TPM2B_NONCE`
while the call is being made.
Signed-off-by: Ionut Mihalcea <[email protected]>
0 commit comments