]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: http-client: Don't use the httpclient context if it was released
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 16 Sep 2026 07:13:30 +0000 (09:13 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 14:50:30 +0000 (16:50 +0200)
commitf2f3f0792dbd6a1b146069b2ec1f6703e695004e
tree04a43b6e9f9473a63a3d5927a42cd747e309c665
parent42a586e52a60deb4e93c76fafd19349d605a3f7a
BUG/MEDIUM: http-client: Don't use the httpclient context if it was released

The I/O handler of the http-client applet may be called after the applet
release. In this case, the httpclient context is no longer available and the
I/O handler must not use it. It is properly handled at the beginning of the
function. However, the code added at the end, on the "out" label, to stop
the data reception is evaluated in all cases, including when the httpclient
context is NULL. It leads to a NULL-pointer dereference.

So, now, <hc> is tested first.

This patch must be backported as far as 3.3 with commit b24260ec9
("BUG/MEDIUM: http-client: Only consume input buffer when hc one is empty").
src/http_client.c