BUG/MAJOR: mux-h2: Report a protocol error for any DATA frame before headers

If any DATA frame is received before all headers are fully received, a
protocol error must be reported. It is required by the HTTP/2 RFC but it is
also important because the HTTP analyzers expect the first HTX block is a
start-line. It leads to a crash if this statement is not respected.

For instance, it is possible to trigger a crash by sending an interim
message with a DATA frame (It may be an empty DATA frame with the ES
flag). AFAIK, only the server side is affected by this bug.

To fix the issue, an protocol error is reported for the stream.

This patch should fix the issue #2291. It must be backported as far as 2.2
(and probably to 2.0 too).

(cherry picked from commit 89e20033c78b7d93f0b75f91d61fa78eef67440d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 35feba657372fe9862ae0ee748ff8b156aa136dc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit ff36e8e4550730f7e02292bb9e234e30186e3123)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 46265821af7d96472967e1b35231c13f06f00a3a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed