]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux_quic: fix invalid PROTOCOL_VIOLATION on POST data overlap
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 4 Jul 2022 07:54:58 +0000 (09:54 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 20 Jul 2022 13:34:58 +0000 (15:34 +0200)
commita18c3339c8d8038377a7ba0a5d0f845924ec1490
treea798a3370645d953c84d79b41fe4e5aa7d597fa5
parentbac3a82a507b029b5e0daf81ed57d07ab8e60677
BUG/MAJOR: mux_quic: fix invalid PROTOCOL_VIOLATION on POST data overlap

Stream data reception is incorrect when dealing with a partially new
offset with some data already consumed out of the RX buffer. In this
case, data length is adjusted but not the data buffer. In most cases,
ncb_add() operation will be rejected as already stored data does not
correspond with the new inserted offset. This will result in an invalid
CONNECTION_CLOSE with PROTOCOL_VIOLATION.

To fix this, buffer pointer is advanced while the length is reduced.

This can be reproduced with a POST request and patching haproxy to call
qcc_recv() multiple times by copying a quic_stream frame with different
offsets.

Must be backported to 2.6.
src/mux_quic.c