BUG/MEDIUM: mworker: don't register mworker_accept_wrapper() when master FD is wrong
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 21 Feb 2023 12:41:24 +0000 (13:41 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 21 Feb 2023 12:53:35 +0000 (13:53 +0100)
commitcc5b9fa593e139fa330f8c7161ff7514315f2837
tree34ab0913bd491710f492f0430bd6e7f997f5abbe
parente16d32050e0c91466c2466b93c177f38f66698e2
BUG/MEDIUM: mworker: don't register mworker_accept_wrapper() when master FD is wrong

This patch handles the case where the fd could be -1 when proc_self was
lost for some reason (environment variable corrupted or upgrade from < 1.9).

This could result in a out of bound array access fdtab[-1] and would crash.

Must be backported in every maintained versions.
src/mworker.c