Menu

#201 1.3.9 has bad code , likely causing NULL ptr deref

Bug
closed-fixed
None
5
2017-02-21
2017-02-09
No

In the 1.3.8 to 1.3.9 diff I see:

  • EVP_CIPHER_CTX ctx;
  • EVP_EncryptInit(&ctx, EVP_aes_256_cbc(), randKey, (unsigned char *)TPMSEAL_IV);
  • EVP_CIPHER_CTX *ctx = NULL;
  • EVP_EncryptInit(ctx, EVP_aes_256_cbc(), randKey, (unsigned char *)TPMSEAL_IV);

EVP_EncryptInit probably wont like ctx==NULL.

did you verify that tpm_unseal and tpm_seal commands do work and not just crash?

you probably want:

EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();

Discussion

  • Hon Ching(Vicky) Lo

    • status: open --> open-accepted
    • assigned_to: Hon Ching(Vicky) Lo
     
  • Hon Ching(Vicky) Lo

    • status: open-accepted --> closed-fixed
     

Log in to post a comment.