]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: filters: Handle filters registered on data with no payload callback
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 14:54:49 +0000 (15:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 15:16:29 +0000 (16:16 +0100)
commit34542d5ec29c89ec45b63107f9330f185f0bfd40
tree7b9263eae6da075aa62c5d64c55c1ea41a0de8a4
parent49b7bcf583261efedabad5ba15c4026f2e713c61
BUG/MEDIUM: filters: Handle filters registered on data with no payload callback

An HTTP filter with no http_payload callback function may be registered on
data. In that case, this filter is obviously not called when some data are
received but it remains important to update its internal state to be sure to
keep it synchronized on the stream, especially its offet value. Otherwise,
the wrong calculation on the global offset may be performed in
flt_http_end(), leading to an integer overflow when data are moved from
input to output. This overflow triggers a BUG_ON() in c_adv().

The same is true for TCP filters with no tcp_payload callback function.

This patch must be backport to all stable versions.
src/filters.c