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

Revert "tls.c: need to free SSL_SESSION when removing it from cache" #4819

Conversation

dilyanpalauzov
Copy link
Contributor

This reverts commit a3523d4.

imapd does crash sometimes, when it handles the TLS connection. #4785 describes such reports from different users.

In such cases Cyrus can log “no shared cipher in SSL_accept() -> fail” or “unexpected eof while reading in SSL_accept() -> fail”.

The recommendation at openssl/openssl#23031 (comment) also states, than doing SSL_SESSION_free() during remove_session_cb() is wrong. If there were leaks, there is probably another case where there is a missing SSL_SESSION_free() call but this place is not right.

• backport to 3.10 and 3.8

@dilyanpalauzov
Copy link
Contributor Author

Closes #4785.

@dilyanpalauzov dilyanpalauzov force-pushed the no_session_free_in_remove_session_cb branch from 0840940 to 6bbe2fe Compare February 25, 2024 16:22
@elliefm elliefm added backport-to-3.8 for PRs that are to be backported to 3.8 backport-to-3.10 for PRs that are to be backported to 3.10 labels Feb 25, 2024
@elliefm
Copy link
Contributor

elliefm commented Feb 25, 2024

@ksmurchison I'm happy with this, but can I get a second opinion? Thanks

I have no insight about where the leak really is (I haven't looked though), but there's enough crash reports to suggest that this wasn't the fix for it.

@ksmurchison
Copy link
Contributor

Hmm. Let me think about it. My patch definitely made valgrind happy. Where are the crash reports?

@elliefm
Copy link
Contributor

elliefm commented Feb 26, 2024

In #4785

@ksmurchison ksmurchison merged commit 30eec6e into cyrusimap:master Feb 26, 2024
1 check passed
@dilyanpalauzov dilyanpalauzov deleted the no_session_free_in_remove_session_cb branch February 26, 2024 17:44
@elliefm elliefm removed the backport-to-3.8 for PRs that are to be backported to 3.8 label Mar 4, 2024
@elliefm elliefm removed the backport-to-3.10 for PRs that are to be backported to 3.10 label Mar 18, 2024
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

3 participants