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

SIGSEGV on murder frontend if backend times out on TLS connection #2177

Closed
MASHtm opened this issue Oct 17, 2017 · 1 comment
Closed

SIGSEGV on murder frontend if backend times out on TLS connection #2177

MASHtm opened this issue Oct 17, 2017 · 1 comment
Assignees

Comments

@MASHtm
Copy link
Contributor

MASHtm commented Oct 17, 2017

My frontends use TLS connections to my backends. Recently one of our backends got loaded due to twoskip locking issues reported earlier. Afterwards I found many coredumps on my frontends all complaining about a NULL Ptr parsing the capabilities. As far as I can tell this is due to the fact that in backend.c the returncode of backend_starttls() is not checked and backend_login is called unconditionally. This is at least true for 2.5.x and HEAD.

This should fix it IMO (based on 2.5.x)

--- backend.c.orig	2016-10-13 01:04:09.392344552 +0200
+++ backend.c	2017-10-17 14:58:24.862930400 +0200
@@ -1016,7 +1016,10 @@
     prot_setisclient(ret->out, 1);
 
     /* Start TLS if required */
-    if (do_tls) r = backend_starttls(ret, NULL, NULL, NULL);
+    if (do_tls) {
+        r = backend_starttls(ret, NULL, NULL, NULL);
+        if (r) goto error;
+    }
 
     /* Login to the server */
     if (prot->type == TYPE_SPEC)
@elliefm
Copy link
Contributor

elliefm commented Jan 9, 2018

Patch looks good, thanks! Applying it to the current branches now...

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

No branches or pull requests

2 participants