]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux-h1: Properly copy chunked input data during zero-copy nego
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jun 2024 09:33:08 +0000 (11:33 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jun 2024 12:06:35 +0000 (14:06 +0200)
commite8cc8a60be614c1cf978233b0b97771c9cc8fa20
treed7fea61a47cb59f8bd0d876055f9508483dacf4e
parent52eb6b23f81d8663ebc6b2fe5d9996916c05ed8f
BUG/MAJOR: mux-h1:  Properly copy chunked input data during zero-copy nego

When data are transfered via zero-copy data forwarding, if some data were
already received, we try to immediately tranfer it during the negociation
step. If data are chunked and the chunk size is unknown, 10 bytes are reserved
to write the chunk size during the done step. However, when input data are
finally transferred, the offset is ignored. Data are copied into the output
buffer. But the first 10 bytes are then crushed by the chunk size. Thus the
chunk is truncated leading to a malformed message.

This patch should fix the issue #2598. It must be backported to 3.0.
src/mux_h1.c