From af733ef6e4bf1790a113c545ea01fccb0e0c2203 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 27 Nov 2023 18:02:16 +0100 Subject: [PATCH] BUG/MEDIUM: mux-h2: Remove H2_SF_NOTIFIED flag for H2S blocked on fast-forward When a H2 stream is blocked during data fast-forwarding, we must take care to remove H2_SF_NOTIFIED flag. This was only performed when data fast-forward was attempted. However, if the H2 stream was blocked for any reason, this flag was not removed. During our tests, we found it was possible to infinitely block a connection because one of its streams was in the send_list with the flag set. In this case, the stream was no longer woken up to resume the sends, blocking all other streams. No backport needed. --- src/mux_h2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index c6b30ff54..ff6a85a2f 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -7041,6 +7041,8 @@ static size_t h2_nego_ff(struct stconn *sc, struct buffer *input, size_t count, ret = count - h2s->sd->iobuf.data; end: + if (h2s->sd->iobuf.flags & IOBUF_FL_FF_BLOCKED) + h2s->flags &= ~H2_SF_NOTIFIED; TRACE_LEAVE(H2_EV_H2S_SEND|H2_EV_STRM_SEND, h2s->h2c->conn, h2s); return ret; }