]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: h3: Crash when h3 trace verbosity is "minimal"
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 8 Sep 2022 13:49:37 +0000 (15:49 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 8 Sep 2022 16:04:58 +0000 (18:04 +0200)
This was due to a missing check in h3_trace() about the first argument
presence (connection) and h3_parse_settings_frm() which calls TRACE_LEAVE()
without any argument. Then this argument was dereferenced.

Must be backported to 2.6

src/h3.c

index 53372c5e3ec9e9638f6139001c073c3bb10fbb0c..28656fc71cee8bc6d917d25bb483fb3d2f2b847c 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1248,6 +1248,9 @@ static void h3_trace(enum trace_level level, uint64_t mask,
        const struct qcc *qcc   = conn ? conn->ctx : NULL;
        const struct qcs *qcs   = a2;
 
+       if (!qcc)
+               return;
+
        if (src->verbosity > H3_VERB_CLEAN) {
                chunk_appendf(&trace_buf, " : qcc=%p(F)", qcc);