Skip to content
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

Fix potential leak in RSA method #350

Closed
wants to merge 1 commit into from
Closed

Fix potential leak in RSA method #350

wants to merge 1 commit into from

Conversation

kFYatek
Copy link

@kFYatek kFYatek commented Sep 10, 2020

Some OpenSSL functions (e.g. pkey_rsa_encrypt()) may cache some information inside an RSA object. See also rsa_ossl_finish() in OpenSSL sources.

libp11 has not been properly freeing those, causing a memory leak. This might be a problem if libp11 is registered as the default RSA method (ENGINE_register_RSA(), ENGINE_set_default_RSA()), which is especially possible if e.g. OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL) has been called, like SoftHSM does.

@mtrojnar
Copy link
Member

mtrojnar commented Oct 5, 2020

Merged in #352.
My mistake. Sorry.

@kFYatek
Copy link
Author

kFYatek commented Oct 7, 2020

Um, sorry, but it looks that you haven't actually merged changes from this PR. #352 was a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants