-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-37702: Fix SSL's certificate-store leak on Windows #15632
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
/cc @erikjanss @tiran @dstufft |
Sorry @neonene and @zooba, I had trouble checking out the |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Sep 9, 2019
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1. (cherry picked from commit ed70129) Co-authored-by: neonene <[email protected]>
GH-15770 is a backport of this pull request to the 3.7 branch. |
zooba
pushed a commit
to zooba/cpython
that referenced
this pull request
Sep 9, 2019
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
GH-15771 is a backport of this pull request to the 3.8 branch. |
miss-islington
added a commit
that referenced
this pull request
Sep 9, 2019
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1. (cherry picked from commit ed70129) Co-authored-by: neonene <[email protected]>
zooba
added a commit
that referenced
this pull request
Sep 9, 2019
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
DinoV
pushed a commit
to DinoV/cpython
that referenced
this pull request
Jan 14, 2020
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
websurfer5
pushed a commit
to websurfer5/cpython
that referenced
this pull request
Jul 20, 2020
ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcount gets incremented by 2.
But CertCloseStore() is called only once and the refcount leaves 1.
Even after this fix, CertEnumCertificatesInStore() can be called successfully.
Closing each store with CERT_CLOSE_STORE_CHECK_FLAG helped me to confirm the above.
https://bugs.python.org/issue37702