[master] b82fd1eee H2: Use the correct queue context when sending rapid reset goaway
Martin Blix Grydeland
martin at varnish-software.com
Thu Aug 21 08:42:03 UTC 2025
commit b82fd1eee320af32f16997e7e755f8f983ba42c8
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Aug 20 13:22:15 2025 +0200
H2: Use the correct queue context when sending rapid reset goaway
When queing for send during rapid reset handling on incoming frame, it is
`h2->req0` that should be used for queueing, not the `struct h2_req` of
the stream for which we are handling the incoming frame. This error would
lead to the queue structure becoming corrupted.
Fixes: #4380
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index fd10b34a8..2956516d6 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -408,9 +408,9 @@ h2_rx_rst_stream(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
if (r2 == NULL)
return (0);
if (h2_rapid_reset_check(wrk, h2, r2)) {
- H2_Send_Get(wrk, h2, r2);
- h2e = h2_rapid_reset_charge(wrk, h2, r2);
- H2_Send_Rel(h2, r2);
+ H2_Send_Get(wrk, h2, h2->req0);
+ h2e = h2_rapid_reset_charge(wrk, h2, h2->req0);
+ H2_Send_Rel(h2, h2->req0);
}
h2_kill_req(wrk, h2, r2, h2_streamerror(vbe32dec(h2->rxf_data)));
return (h2e);
More information about the varnish-commit
mailing list