From: Amaury Denoyelle Date: Thu, 12 Nov 2026 14:31:14 +0000 (+0100) Subject: BUG/MINOR: h3: close connection on response start-line alloc failure X-Git-Tag: v3.5-dev12~27 X-Git-Url: https://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=cf19fffaed0c950c64904fe8e045a0df5a8db53d;p=haproxy.git BUG/MINOR: h3: close connection on response start-line alloc failure On QUIC backend side, correct the error handling when HTX start-line cannot be allocated during HTTP/3 response parsing. Previously, a stream error would be reported with H3_MESSAGE_ERROR. Now, h3_resp_headers_to_htx() only returns a default negative value without any explicit error code. This results in a connection level error using H3_INTERNAL_ERROR, generated at the end of h3_rcv_buf(). This pattern is already used on request parsing. It is necessary to close the connection asap on memory exhaustion while differentiating between a peer protocol violation and an haproxy internal error. This must be backported up to 3.3. --- diff --git a/src/h3.c b/src/h3.c index 0040b3579..278bafccd 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1426,7 +1426,6 @@ static ssize_t h3_resp_headers_to_htx(struct qcs *qcs, const struct buffer *buf, sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/3.0"), status, ist("")); if (!sl) { TRACE_ERROR("cannot allocate HTX start-line", H3_EV_RX_FRAME|H3_EV_RX_HDR, qcs->qcc->conn, qcs); - h3s->err = H3_ERR_MESSAGE_ERROR; len = -1; goto out; }