]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server: ensure server is detached from proxy list before being freed
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 13 Jan 2026 18:15:07 +0000 (19:15 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 19 Jan 2026 13:24:04 +0000 (14:24 +0100)
commitd38b918da1c8deece731e2fba36576f0b077ed76
tree70f1efb2d3e4520af464ec4a4c7cb740943bfddb
parent12dc9325a7502f51d1e7f056497893f5330a7a5e
BUG/MINOR: server: ensure server is detached from proxy list before being freed

There remained some cases (on error paths) were a server could be freed
while still attached on the parent proxy server list. In 3.3 this can be
problematic because new_server() automatically adds the server to the
parent proxy list.

The bug is insignificant because it is on errors paths during init and
often haproxy exits right after. But let's fix that to ensure no UAF or
undefined behavior occurs because of that.

This patch depends on ("MINOR: cli: use srv_drop() when server was created using new_server()")

It must be backported in 3.3 with the above mentioned patch.
src/cli.c
src/server.c