]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stats-html: Never dump more data than expected during 0-copy FF
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Oct 2024 05:47:41 +0000 (07:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Oct 2024 06:00:32 +0000 (08:00 +0200)
commit529e4f36a353bca292196e1344a79b8cd4ba143c
tree6df877404b7db78559942b0ee7766af151c6fad1
parentf2c415cec1861322d3745edca959d164955fcfe0
BUG/MEDIUM: stats-html: Never dump more data than expected during 0-copy FF

During the zero-copy data forwarding, the caller specify the maximum amount
of data the producer may push. However, the HTML stats applet does not use
it and can fill all the free space in the buffer.  It is especially an issue
when the consumer is limited by a flow control, like the H2. Because we may
emit too large DATA frame in this case. It is especially visible with big
buffer (for instance 32k).

In the early age or zero-copy data forwarding, the caller was responsible to
pass a properly resized buffer. And during the different refactoring steps,
this has changed but the HTML stats applet was not updated accordingly.

To fix the bug, the buffer used to dump the HTML page is resized to be sure
not too much data are dumped.

This patch should solve the issue #2757. It must be backported to 3.0.
src/stats-html.c