]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submisssion-login: Fix segfault occuring at proxy AUTH upon relay connection failure
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 27 Nov 2025 23:47:02 +0000 (00:47 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 1 Dec 2025 06:50:46 +0000 (06:50 +0000)
Fixed by halting server input once proxy authentication succeeds. This prevents
race conditions between input from proxy server and command output, which causes
a segfault when the current server command is already cleared when more input
(beyond AUTH success) from the proxy server comes in.

src/submission-login/submission-proxy.c

index c239040b6c3f6f6b7bc3b572330e9313ec343acb..47e4994e1623c25f08c80fa96c3f0aae021e211b 100644 (file)
@@ -651,6 +651,7 @@ int submission_proxy_parse_line(struct client *client, const char *line)
                        command, SMTP_SERVER_COMMAND_HOOK_DESTROY,
                        submission_proxy_success_reply_sent, subm_client);
 
+               login_proxy_input_halt(client->login_proxy);
                subm_client->auth_cmd = NULL;
 
                /* Login successful. Send this reply to client. */