]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux-h2: Handle HEADERS frames received after a RST_STREAM frame
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Sep 2019 13:28:20 +0000 (15:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Sep 2019 13:28:23 +0000 (15:28 +0200)
commit6884aa3eb00d1a5eb6f9c81a3a00288c13652938
tree1a297f81de41c0e47b5abef885f24f554916a27f
parent0ce57b05de9a6ed316753ab8cd060390f4b89b62
BUG/MAJOR: mux-h2: Handle HEADERS frames received after a RST_STREAM frame

As stated in the RFC7540#5.1, an endpoint that receives any frame other than
PRIORITY after receiving a RST_STREAM MUST treat that as a stream error of type
STREAM_CLOSED. However, frames carrying compression state must still be
processed before being dropped to keep the HPACK decoder synchronized. This had
to be the purpose of the commit 8d9ac3ed8b ("BUG/MEDIUM: mux-h2: do not abort
HEADERS frame before decoding them"). But, the test on the frame type was
inverted.

This bug is major because desynchronizing the HPACK decoder leads to mixup
indexed headers in messages. From the time an HEADERS frame is received and
ignored for a closed stream, wrong headers may be sent to the following streams.

This patch may fix several bugs reported on github (#116, #290, #292). It must
be backported to 2.0 and 1.9.
src/mux_h2.c