]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux_quic: do not crash on unhandled QMux frame reception
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 May 2026 13:51:34 +0000 (15:51 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 May 2026 13:57:20 +0000 (15:57 +0200)
Completes qmux_parse_frm() to ensure every frames allowed by QMux
protocol are listed. For now, nothing is implemented except a CHECK_IF()
to report such events.

This is necessary to prevent a crash on abort. Frames not supported by
QMux should already have been rejected prior via qmux_is_frm_valid().

src/qcm_qmux.c

index 308a9d44ce08be2f6ad4a31804c8965c2d509482..801ad3e1021a86fe71c5151500df087e1697debe 100644 (file)
@@ -95,8 +95,17 @@ static int qmux_parse_frm(struct qcc *qcc, struct buffer *buf)
                 frm.type == QUIC_FT_STREAMS_BLOCKED_BIDI ||
                 frm.type == QUIC_FT_STREAMS_BLOCKED_UNI) {
                /* TODO */
+               CHECK_IF("received flow control blocked frame not yet handled in QMux");
+       }
+       else if (frm.type == QUIC_FT_PADDING) {
+               CHECK_IF("received padding frame not yet handled in QMux");
+       }
+       else if (frm.type == QUIC_FT_CONNECTION_CLOSE ||
+                frm.type == QUIC_FT_CONNECTION_CLOSE_APP) {
+               CHECK_IF("received connection_close frame not yet handled in QMux");
        }
        else {
+               /* qmux_is_frm_valid() must prevent this */
                ABORT_NOW();
        }