From: Amaury Denoyelle Date: Thu, 8 Oct 2026 12:54:26 +0000 (+0200) Subject: BUG/MINOR: mux_quic: prevent RS/SS on unistream with hq-interop X-Git-Tag: v3.5-dev10~175 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=bd1582842f004530b2dc0eebb0d3f594f5fea5cb;p=haproxy.git BUG/MINOR: mux_quic: prevent RS/SS on unistream with hq-interop When app layer has been shut, qcs_new() will immediately abort a new stream via attach callback. App proto hq-interop does not define shutdown callback. In this case, it is expected that the app layer won't reject a new stream during attach. MUX QUIC is thus responsible to shut the stream itself using RESET_STREAM + STOP_SENDING. This causes a protocol violation if the opened stream is unidirectional. On RESET_STREAM emission, the peer may close the connection on fatal error, aborting any possibly still active transfers. Fix this by ensuring only STOP_SENDING is emitted in this case. In practice, this bug is not encountered today as it only impacts hq-interop protocol, and uni streams are not used in this case. This must be backported to 3.4. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 3bfac5d95..7af0ac303 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -239,7 +239,8 @@ static struct qcs *qcs_new(struct qcc *qcc, uint64_t id, enum qcs_type type) */ if (qcc->app_st >= QCC_APP_ST_SHUT && !qcc->app_ops->shutdown) { qcc_abort_stream_read(qcs, 0); - qcc_reset_stream(qcs, 0, 0); + if (!quic_stream_is_uni(qcs->id)) + qcc_reset_stream(qcs, 0, 0); goto out; } else if (qcc->app_ops->attach && qcc->app_ops->attach(qcs, qcc->ctx)) {