]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stconn: Check FF data of SC to perform a shutdown in sc_notify()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2024 09:54:54 +0000 (11:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2024 11:53:40 +0000 (13:53 +0200)
commit0fcfed9e231f2bc3963fe6085598970db2174af1
treed68eb38dd2e2523b1769575b801bb9739a5ad6c5
parent6790067e79566b2ca5943e72200361c40001bde2
BUG/MEDIUM: stconn: Check FF data of SC to perform a shutdown in sc_notify()

In sc_notify() function, the consumer side of the SC is tested to verify if
we must perform a shutdown on the endpoint. To do so, no output data must be
present in the buffer and in the iobuf. However, there is a bug here, the
iobuf of the opposite SC is tested instead of the one of the current SC. So
a shutdown can be performed on the endpoint while there are still output
data in the iobuf that must be sent. Concretely, it can only be data blocked
in a pipe.

Because of this bug, data blocked in the pipe will be never sent. I've not
tested but I guess this may block the stream during the client or server
timeout.

This patch must be backported as far as 2.9.
src/stconn.c