-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
possible memory leak in soter_rsa_gen_key() [OpenSSL] #516
Comments
yes, agree. we will fix it |
but read documentation and think we should not change anything. from documentation of openssl, EVP_PKEY_CTX_ctrl and EVP_PKEY_CTRL_RSA_KEYGEN_BITS the macros for EVP_PKEY_CTX_set_rsa_keygen_pubexp function call - https://docs.huihoo.com/doxygen/openssl/1.0.1c/crypto_2rsa_2rsa_8h_source.html#l00232
So we should not free after call |
hm, you right. not so easy as I thought) thanks very match, I will re-check more carefully usage of these functions and unify across our backends |
I have perused OpenSSL's documentation and source code and it seems that the current code in OpenSSL backend is correct: themis/src/soter/openssl/soter_rsa_common.c Lines 62 to 64 in da8b52c
We must not free We should fix other places instead. |
Superseded by #517 |
in https://github.com/cossacklabs/themis/blob/master/src/soter/openssl/soter_rsa_common.c, in
I think that BN_free(pub_exp) need to be called in this plase. Please check it out.
The text was updated successfully, but these errors were encountered: