tpm2-software / tpm2-tss-engine

OpenSSL Engine for TPM2 devices
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
150 stars 100 forks source link

Bad free #245

Closed AndreasFuchsTPM closed 2 years ago

AndreasFuchsTPM commented 2 years ago

These should be OPENSSL_free() https://github.com/tpm2-software/tpm2-tss-engine/blob/c0200843a13fc0d5e7a12e0200ce46859596c1ca/src/tpm2-tss-engine-common.c#L697 https://github.com/tpm2-software/tpm2-tss-engine/blob/c0200843a13fc0d5e7a12e0200ce46859596c1ca/src/tpm2tss-genkey.c#L407 https://github.com/tpm2-software/tpm2-tss-engine/blob/c0200843a13fc0d5e7a12e0200ce46859596c1ca/src/tpm2tss-genkey.c#L411

Also, there are a bunch of free() calls that should be Esys_Free() all over the project.