]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MEDIUM: mux_quic: activate timeout on FE init
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 23 Sep 2026 14:45:32 +0000 (16:45 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Sep 2026 09:43:06 +0000 (11:43 +0200)
Prior to this patch, QUIC MUX timeout was only queued after receiving
the first bytes of data. Thus the timeout would be inactive after
initialization if nothing is received, with a risk of connection leak.

To properly address this, QUIC MUX task timeout is now queued
immediately after initialization has been performed.

The risk of connection leak caused by QUIC MUX is now greatly reduced.
For example, the previous issue on RESET_STREAM reception handling
cannot cause anymore such leak with the current code.

This must be backported to all stable releases.

src/mux_quic.c

index b5da163cffa1d756e2ebd3a3003cae645c5479b1..23433aacc0b75a0cc7b115c470eda29b5ec0b0ab 100644 (file)
@@ -4111,6 +4111,12 @@ static int qcm_init(struct connection *conn, struct proxy *prx,
                /* Register conn for idle front closing. */
                LIST_APPEND(&mux_stopping_data[tid].list, &conn->stopping_list);
 
+               if (tick_isset(qcc->task->expire)) {
+                       /* Activate client timeout until the first bytes of data are received. */
+                       TRACE_DEVEL("activate default timeout", QMUX_EV_QCC_NEW, conn);
+                       task_queue(qcc->task);
+               }
+
                /* init read cycle */
                tasklet_wakeup(qcc->wait_event.tasklet);