Skip to content

Commit 053c209

Browse files
committed
BUG/MINOR: mux-quic: trace with non initialized qcc
This issue leads to crashes when the QUIC mux traces are enabled and could be reproduced with -dMfail. When the qcc allocation fails (qcc_init()) haproxy crashes into qmux_dump_qcc_info() because ->conn qcc member is initialized: Program terminated with signal SIGSEGV, Segmentation fault. at src/qmux_trace.c:146 146 const struct quic_conn *qc = qcc->conn->handle.qc; [Current thread is 1 (LWP 1448960)] (gdb) p qcc $1 = (const struct qcc *) 0x7f9c63719fa0 (gdb) p qcc->conn $2 = (struct connection *) 0x155550508 (gdb) This patch simply fixes the TRACE() call concerned to avoid <qcc> object dereferencing when it is NULL. Must be backported as far as 3.0.
1 parent 292088e commit 053c209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mux_quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3706,7 +3706,7 @@ static int qmux_init(struct connection *conn, struct proxy *prx,
37063706
conn->ctx = NULL;
37073707
}
37083708

3709-
TRACE_DEVEL("leaving on error", QMUX_EV_QCC_NEW, conn);
3709+
TRACE_DEVEL("leaving on error", QMUX_EV_QCC_NEW, qcc ? conn : NULL);
37103710
return -1;
37113711
}
37123712

0 commit comments

Comments
 (0)