]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: server: Duplicate healthcheck's alpn inherited from default server
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Sep 2025 13:04:18 +0000 (15:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Sep 2025 13:45:05 +0000 (15:45 +0200)
commitf7a04b428a47edeabfe40bf1a48a85b03c105633
treef535ec96581dfd320372de4814af64c62e8cc96a
parent6ea50ba462692d6dcf301081f23cab3e0f6086e4
BUG/MEDIUM: server: Duplicate healthcheck's alpn inherited from default server

When "check-alpn" parameter is inherited from the default server, the value
is not duplicated, the pointer of the default server is used. However, when
this parameter is overridden, the old value is released. So the "check-alpn"
value of the default server is released. So it is possible to have a UAF if
if another server inherit from the same the default server.

To fix the issue, the "check-alpn" parameter must be handled the same way
the "alpn" is. The default value is duplicated. So it could be safely
released if it is forced on the server line.

This patch should fix the issue #3096. It must be backported to all stable
versions.
src/check.c
src/server.c