From: Christopher Faulet Date: Wed, 8 Apr 2026 06:07:14 +0000 (+0200) Subject: BUG/MEDIUM: connection: Wake the stconn on error when failing to create mux X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7add82f9211e0bc87ed5361220694ffc10c0062;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: connection: Wake the stconn on error when failing to create mux When the app_ops were removed, direct calls to the SC wake callback function were replaced by tasklet wakeups. However, in conn_create_mux(), it was replaced by a direct call to sc_conn_process(). However, sc_conn_process() is only usable when the SC is attach to a stream. A backend mux can be created for a healcheck. In this context, sc_conn_process() cannot be called. Because of this bug, crashes can be experienced when an error is triggered during a SSL connection attempt from a healthcheck. To fix the issue, the call to sc_conn_process() was replaced by a tasklet wakeup. This patch should fix the issue #3326. No backport needed. --- diff --git a/src/connection.c b/src/connection.c index 52a6fb368..e3b891528 100644 --- a/src/connection.c +++ b/src/connection.c @@ -141,7 +141,7 @@ int conn_create_mux(struct connection *conn, int *closed_connection) fail: /* let the upper layer know the connection failed */ if (sc) { - sc_conn_process(sc); + tasklet_wakeup(sc->wait_event.tasklet, TASK_WOKEN_MSG); } else if (conn_reverse_in_preconnect(conn)) { struct listener *l = conn_active_reverse_listener(conn);