]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: session: NULL dereference possible when accessing the listener
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 8 Mar 2021 14:26:48 +0000 (15:26 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 9 Mar 2021 11:51:42 +0000 (12:51 +0100)
commit36119de182154b1f87e0cdf4bd1efba9e2e64113
treeacb39caed02a975f7fe1f8966d1a3353ad99d112
parentc93638e1d155f6419bca50daec42dcd370bae39f
BUG/MEDIUM: session: NULL dereference possible when accessing the listener

When implementing a client applet, a NULL dereference was encountered on
the error path which increment the counters.

Indeed, the counters incremented are the one in the listener which does
not exist in the case of client applets, so in sess->listener->counters,
listener is NULL.

This patch fixes the access to the listener structure when accessing
from a sesssion, most of the access are the counters in error paths.

Must be backported as far as 1.8.
src/fcgi-app.c
src/http_act.c
src/http_ana.c
src/mux_h1.c
src/tcp_act.c
src/tcp_rules.c