]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: sink: invalid server list in sink_new_from_logsrv()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 6 Jul 2023 12:57:32 +0000 (14:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Jul 2023 13:41:17 +0000 (15:41 +0200)
commit999699a277d85e875c5351cfe949c851f574f007
tree046a0cab59ad80259a4d49b02c82cc7ab9950f81
parentca4fd73938f3eeb7bb81bc85d49b3076e2e26178
BUG/MEDIUM: sink: invalid server list in sink_new_from_logsrv()

forward proxy server list created from sink_new_from_logsrv() is invalid

Indeed, srv->next is literally assigned to itself. This did not cause
issues during syslog handling because the sft was properly set, but it
will cause the free_proxy(sink->forward_px) at deinit to go wild since
free_proxy() will try to iterate through the proxy srv list to free
ressources, but because of the improper list initialization, double-free
and infinite-loop will occur.

This bug was revealed by 9b1d15f53a ("BUG/MINOR: sink: free forward_px on deinit()")

It must be backported as far as 2.4.
src/sink.c