]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: htx: Fix htx_xfer() to consume more data than expected
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Mar 2026 16:12:18 +0000 (17:12 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Mar 2026 16:19:12 +0000 (17:19 +0100)
commit4fd5cafe2718b2d30806fa55733470d3d77cc457
tree0670ff3cf1ca91a3fe5b3d9882e38c2303d9b76e
parentd26bd9f9781aaab295a7c5c18894212c67ac8ad4
BUG/MEDIUM: htx: Fix htx_xfer() to consume more data than expected

When an htx DATA block is partially transfer, we must take care to remove
exactly the copied size. To do so, we must save the size of the last block
value copied and not rely on the last data block after the copy. Indeed,
data can be merged with an existing DATA block, so the last block size can
be larger than the last part copied.

Because of this issue, it is possible to remove more data than
expected. Worse, this could lead to a crash by performing an integer
overflow on the block size.

No backport needed.
src/htx.c