From: Amaury Denoyelle Date: Mon, 16 Nov 2026 09:23:02 +0000 (+0100) Subject: BUG/MINOR: h3: reject CANCEL_PUSH on backend side X-Git-Url: https://git.kaiwu.me/http/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=2062962dfd685f2dcf2610b062a1419d97a59535;p=haproxy.git BUG/MINOR: h3: reject CANCEL_PUSH on backend side CANCEL_PUSH frames are always rejected on the frontend side as haproxy never emits PUSH_PROMISE frames. Rejection must also be performed systematically on the backend side as haproxy never emits MAX_PUSH_ID frames, hence any push IDs mentionned by the server are invalid. The outcome is the same on both sides: the connection is closed with H3_ID_ERROR and a glitch is accounted. This must be backported up to 3.3. --- diff --git a/src/h3.c b/src/h3.c index 0447b0574..a143ad0aa 100644 --- a/src/h3.c +++ b/src/h3.c @@ -2248,24 +2248,21 @@ static ssize_t h3_rcv_buf(struct qcs *qcs, struct buffer *b, int fin) goto err; } - if (!conn_is_back(qcs->qcc->conn)) { - /* RFC 9114 7.2.3. CANCEL_PUSH - * - * If a server receives a CANCEL_PUSH frame for a push ID - * that has not yet been mentioned by a PUSH_PROMISE frame, this MUST be - * treated as a connection error of type H3_ID_ERROR. - */ - TRACE_ERROR("reject CANCEL_PUSH from client", H3_EV_RX_FRAME, qcs->qcc->conn, qcs); - qcc_set_error(qcs->qcc, H3_ERR_ID_ERROR, 1, - muxc_tevt_type_proto_err); - qcc_report_glitch(qcs->qcc, 1); - goto err; - } - else { - /* Not supported */ - ret = flen; - } - break; + /* RFC 9114 7.2.3. CANCEL_PUSH + * + * If a CANCEL_PUSH frame is received that + * references a push ID greater than currently allowed on the + * connection, this MUST be treated as a connection error of type + * H3_ID_ERROR. + * + * If a server receives a CANCEL_PUSH frame for a push ID + * that has not yet been mentioned by a PUSH_PROMISE frame, this MUST be + * treated as a connection error of type H3_ID_ERROR. + */ + TRACE_ERROR("reject CANCEL_PUSH from peer", H3_EV_RX_FRAME, qcs->qcc->conn, qcs); + qcc_set_error(qcs->qcc, H3_ERR_ID_ERROR, 1, muxc_tevt_type_proto_err); + qcc_report_glitch(qcs->qcc, 1); + goto err; case H3_FT_GOAWAY: ret = h3_parse_goaway_frm(qcs->qcc->ctx, b, flen); if (ret < 0) {