]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: proxy: detect strdup error on server auto SNI
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 19 Feb 2026 15:04:04 +0000 (16:04 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 Feb 2026 08:02:47 +0000 (09:02 +0100)
commit2b0fc331149f6806fb99f37affa38385556f5adb
tree499b9239de679723cc27ed163b8f271bfa371fed
parentf5a182c7e7411ff44ba563fe3ed459eb21340fed
BUG/MINOR: proxy: detect strdup error on server auto SNI

There was no check on the result of strdup() used to setup auto SNI on a
server instance during check config validity. In case of failure, the
error would be silently ignored as the following server_parse_exprs()
does nothing when <sni_expr> server field is NULL. Hence, no SNI would
be used on the server, without any error nor warning reported.

Fix this by adding a check on strdup() return value. On error, ERR_ABORT
is reported along with an alert, parsing should be interrupted as soon
as possible.

This must be backported up to 3.3. Note that the related code in this
case is present in cfgparse.c source file.
src/proxy.c