Skip to content

Commit

Permalink
Fix use-after-free with EVP_CIPHER_free
Browse files Browse the repository at this point in the history
In many scenerios the context will still have a reference to the cipher, so
this use-after-free does not explode but it is still wrong.

Change-Id: I59002d6613eaef36d5a47b20b56073e399cfa1df
  • Loading branch information
schwabe committed Jul 7, 2023
1 parent 4477506 commit 6f2573a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/openvpn/crypto_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ cipher_ctx_init(EVP_CIPHER_CTX *ctx, const uint8_t *key,
EVP_CIPHER_free(kt);
}


int
cipher_ctx_iv_length(const EVP_CIPHER_CTX *ctx)
{
Expand Down

0 comments on commit 6f2573a

Please sign in to comment.