]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mworker/cli: crash when trying to access an old PID in prompt mode
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 10 Dec 2021 13:14:53 +0000 (14:14 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 10 Dec 2021 13:30:18 +0000 (14:30 +0100)
commitdcbe7b91d69f6857961d1545ae71205d9afb905f
tree1ef13dc811960fb820b330050eb5292726a37990
parent2b94973e0f1102568d9393998e23f4402ac459a0
BUG/MEDIUM: mworker/cli: crash when trying to access an old PID in prompt mode

The master process encounter a crash when trying to access an old
process which left from the master CLI.

To reproduce the problem, you need a prompt to a previous worker, then
wait for this worker to leave, once it left launch a command from this
prompt. The s->target is then filled with a NULL which is dereferenced
when trying to connect().

This patch fixes the problem by checking if s->target is NULL.

Must be backported as far as 2.0.
src/cli.c