]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux_h2: Don't consume more payload than received for skipped frames
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Sep 2019 14:38:28 +0000 (16:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Sep 2019 14:51:02 +0000 (16:51 +0200)
commit5112a603d9507cac84ae544863251e814e5eb8d8
tree162ea9744a8423734734b5beadaec8bab2a83528
parentea7a7781a94addb9fb18ef8064c96d73fe5add3d
BUG/MAJOR: mux_h2: Don't consume more payload than received for skipped frames

When a frame is received for a unknown or already closed stream, it must be
skipped. This also happens when a stream error is reported. But we must be sure
to only skip received data. In the loop in h2_process_demux(), when such frames
are handled, all the frame lenght is systematically skipped. If the frame
payload is partially received, it leaves the demux buffer in an undefined
state. Because of this bug, all sort of errors may be observed, like crash or
intermittent freeze.

This patch must be backported to 2.0, 1.9 and 1.8.
src/mux_h2.c