]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: possible crash when using capture headers on TCP frontends
authorWilly Tarreau <w@1wt.eu>
Sat, 24 Mar 2012 07:28:09 +0000 (08:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 24 Mar 2012 07:35:36 +0000 (08:35 +0100)
commit42f7d89156b6e6ddc2110cd4b25d976725d4cfa7
tree45be4bc34cfc00502444ce98a8a65eb9534ae669
parent7f25debbd261092034e4f94fe442cad60d60fb26
BUG/MAJOR: possible crash when using capture headers on TCP frontends

Olufemi Omojola provided a config and a core showing a possible crash
when captures are configured on a TCP-mode frontend which branches to
an HTTP backend. The reason is that being in TCP mode, the frontend
does not allocate capture pools for the request, but the HTTP backend
tries to use them and dies on the NULL.

While such a config has long been unlikely to happen, it looks like
people using websocket tend to do this more often now.

Change the control to use the pointer instead of the number of captures
to know when to log.

This bug was reported in 1.4.20, so it must be backported there.
src/proto_http.c