]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: Refuse interim responses with end-stream flag set
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Dec 2022 08:47:01 +0000 (09:47 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Dec 2022 12:46:21 +0000 (13:46 +0100)
commit827a6299e6995c5c3ba620d8b7cbacdaef67f2c4
tree990f1e33875ad5bf3ef130837eea3316a6ff1f61
parenteb5302023f4f445d2d5278603d842051e0def6aa
BUG/MEDIUM: mux-h2: Refuse interim responses with end-stream flag set

As state in RFC9113#8.1, HEADERS frame with the ES flag set that carries an
informational status code is malformed. However, there is no test on this
condition.

On 2.4 and higher, it is hard to predict consequences of this bug because
end of the message is only reported with a flag. But on 2.2 and lower, it
leads to a crash because there is an unexpected extra EOM block at the end
of an interim response.

Now, when a ES flag is detected on a HEADERS frame for an interim message, a
stream error is sent (RST_STREAM/PROTOCOL_ERROR).

This patch should solve the issue #1972. It should be backported as far as
2.0.
src/mux_h2.c