]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
5 days agoCLEANUP: mworker/cli: remove useless variable
William Lallemand [Mon, 8 Dec 2025 17:06:24 +0000 (18:06 +0100)] 
CLEANUP: mworker/cli: remove useless variable

The msg variable is declared and free but never used, this patch removes it.

5 days agoBUG/MEDIUM: h3: do not access QCS <sd> if not allocated
Amaury Denoyelle [Tue, 9 Dec 2025 10:18:54 +0000 (11:18 +0100)] 
BUG/MEDIUM: h3: do not access QCS <sd> if not allocated

Since the following commit, allocation of QCS stream-endpoint on FE side
has been delayed. The objective is to allocate it only for QCS attached
to an upper stream object. Stream-endpoint allocation is now performed
on qcs_attach_sc() called during HEADERS parsing.

  commit e6064c561684d9b079e3b5725d38dc3b5c1b5cd5
  OPTIM: mux-quic: delay FE sedesc alloc to stream creation

Also, stream-endpoint is accessed through the QCS instance after HEADERS
or DATA frames parsing, to update the known input payload length. The
above patch triggered regressions as in some code paths, <sd> field is
dereferenced while still being NULL.

This patch fixes this by restricting access to <sd> field after newer
conditions.

First, after HEADERS parsing, known input length is only updated if
h3_req_headers_to_htx() previously returned a success value, which
guarantee that qcs_attach_sc() has been executed.

After DATA parsing, <sd> is only accessed after the frame validity
check. This ensures that HEADERS were already parsed, thus guaranteing
that stream-endpoint is allocated.

This should fix github issue #3211.

This must be backported up to 3.3. This is sufficient, unless above
patch is backported to previous releases, in which case the current one
must be picked with it.

5 days agoREGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC
Frederic Lecaille [Mon, 8 Dec 2025 16:39:45 +0000 (17:39 +0100)] 
REGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC

ssl/tls13_ssl_crt-list_filters.vtc was renamed to ssl/tls13_ssl_crt-list_filters.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then tls13_ssl_crt-list_filters.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

5 days agoMINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version
Frederic Lecaille [Mon, 8 Dec 2025 15:59:12 +0000 (16:59 +0100)] 
MINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version

Seperate the section from ssl_crt-list_filters.vtc which supports TLS 1.2 and 1.3
versions to produce tls12_ssl_crt-list_filters.vtc and tls13_ssl_crt-list_filters.vtc.

6 days agoDOC: config: Improve spop mode documentation
Christopher Faulet [Mon, 8 Dec 2025 14:24:00 +0000 (15:24 +0100)] 
DOC: config: Improve spop mode documentation

The spop mode description was a bit confusing. So let's improve it.

Thanks to @NickMRamirez.

This patch shoud fix issue #3206. It could be backported as far as 3.1.

6 days agoDOC: config: Fix description of the spop mode
Christopher Faulet [Fri, 5 Dec 2025 14:33:02 +0000 (15:33 +0100)] 
DOC: config: Fix description of the spop mode

It was mentionned that the spop mode turned the backend into a "log"
backend. It is obviously wrong. It turns the backend into a spop backend.

This patch should be backported as far as 3.1.

6 days agoBUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode
Christopher Faulet [Mon, 8 Dec 2025 14:07:03 +0000 (15:07 +0100)] 
BUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode

It is a very old bug (2012), dating from the introduction of the keep-alive
support to HAProxy. When a request is fully received, the SC on backend side
is switched to NOHALF mode. It means that when the read0 is received from
the server, the server connection is immediately closed. It is expected to
do so at the end of a classical request. However, it must not be performed
if the session is switched to the TUNNEL mode (after an HTTP/1 upgrade or a
CONNECT). The client may still have data to send to the server. And closing
brutally the server connection this way will be handled as an error on
client side.

This bug is especially visible when a H2 connection on client side because a
RST_STREAM is emitted and a "SD--" is reported in logs.

Thanks to @chrisstaite

This patch should fix the issue #3205. It must be backported to all stable
versions.

6 days agoBUG/MINOR: log: Dump good %B and %U values in logs
Christopher Faulet [Mon, 8 Dec 2025 13:52:59 +0000 (14:52 +0100)] 
BUG/MINOR: log: Dump good %B and %U values in logs

When per-stream "bytes_in" and "bytes_out" counters where replaced in 3.3,
the wrong counters were used for %B and %U values in logs. In the
configuration manual and the commit message, it was specificed that
"bytes_in" was replaced by "req_in" and "bytes_out" by "res_in", but in the
code, wrong counters were used. It is now fixed.

This patch should fix the issue #3208. It must be backported to 3.3.

6 days agoMEDIUM: ssl/server: No longer store the SNI of cached TLS sessions
Christopher Faulet [Fri, 5 Dec 2025 16:35:53 +0000 (17:35 +0100)] 
MEDIUM: ssl/server: No longer store the SNI of cached TLS sessions

Thanks to the previous patch, "BUG/MEDIUM: ssl: Don't reuse TLS session
if the connection's SNI differs", it is no useless to store the SNI of
cached TLS sessions. This SNI is no longer tested and new connections
reusing a session must have the same SNI.

The main change here is for the ssl_sock_set_servername() function. It is no
longer possible to compare the SNI of the reused session with the one of the
new connection. So, the SNI is always set, with no other processing. Mainly,
the session is not destroyed when SNIs don't match. It means the commit
119a4084bf ("BUG/MEDIUM: ssl: for a handshake when server-side SNI changes")
is implicitly reverted.

It is good to note that it is unclear for me when and why the reused session
should be destroyed. Because I'm unable to reproduce any issue fixed by the
commit above.

This patch could be backported as far as 3.0 with the commit above.

6 days agoBUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs
Christopher Faulet [Fri, 5 Dec 2025 10:16:46 +0000 (11:16 +0100)] 
BUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs

When a new SSL server connection is created, if no SNI is set, it is
possible to inherit from the one of the reused TLS session. The bug was
introduced by the commit 95ac5fe4a ("MEDIUM: ssl_sock: always use the SSL's
server name, not the one from the tid"). The mixup is possible between
regular connections but also with health-checks connections.

But it is only the visible part of the bug. If the SNI of the cached TLS
session does not match the one of the new connection, no reuse must be
performed at all.

To fix the bug, hash of the SNI of the reused session is compared with the
one of the new connection. The TLS session is reused only if the hashes are
the same.

This patch should fix the issue #3195. It must be slowly backported as far
as 3.0. it relies on the following series:

  * MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
  * MINOR: connection/ssl: Store the SNI hash value in the connection itself
  * MEDIUM: ssl: Store hash of the SNI for cached TLS sessions
  * MINOR: ssl: Add a function to hash SNIs
  * MEDIUM: quic: Add connection as argument when qc_new_conn() is called
  * BUG/MINOR: ssl: Don't allow to set NULL sni

6 days agoMEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
Christopher Faulet [Fri, 5 Dec 2025 10:10:53 +0000 (11:10 +0100)] 
MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx

The SNI of a new connection is now retrieved earlier, before the
initialization of the SSL context. So, concretely, it is now performed
before calling conn_prepare(). The SNI is then set just after.

6 days agoMINOR: connection/ssl: Store the SNI hash value in the connection itself
Christopher Faulet [Fri, 5 Dec 2025 10:04:21 +0000 (11:04 +0100)] 
MINOR: connection/ssl: Store the SNI hash value in the connection itself

When a SNI is set on a new connection, its hash is now saved in the
connection itself. To do so, a dedicated field was added into the connection
strucutre, called sni_hash. For now, this value is only used when the TLS
session is cached.

6 days agoMINOR: ssl: Compare hashes instead of SNIs when a session is cached
Christopher Faulet [Fri, 5 Dec 2025 15:23:53 +0000 (16:23 +0100)] 
MINOR: ssl: Compare hashes instead of SNIs when a session is cached

This patch relies on the commit "MINOR: ssl: Store hash of the SNI for
cached TLS sessions". We now use the hash of the SNIs instead of the SNIs
themselves to know if we must update the cached SNI or not.

6 days agoMINOR: ssl: Store hash of the SNI for cached TLS sessions
Christopher Faulet [Fri, 5 Dec 2025 09:37:27 +0000 (10:37 +0100)] 
MINOR: ssl: Store hash of the SNI for cached TLS sessions

For cached TLS sessions, in addition to the SNI itself, its hash is now also
saved. No changes are expected here because this hash is not used for now.

This commit relies on:

  * MINOR: ssl: Add a function to hash SNIs

6 days agoMINOR: ssl: Add a function to hash SNIs
Christopher Faulet [Fri, 5 Dec 2025 08:28:56 +0000 (09:28 +0100)] 
MINOR: ssl: Add a function to hash SNIs

This patch only adds the function ssl_sock_sni_hash() that can be used to
get the hash value corresponding to an SNI. A global seed, sni_hash_seed, is
used.

6 days agoMEDIUM: quic: Add connection as argument when qc_new_conn() is called
Christopher Faulet [Wed, 3 Dec 2025 13:30:30 +0000 (14:30 +0100)] 
MEDIUM: quic: Add connection as argument when qc_new_conn() is called

This patch reverts the commit efe60745b ("MINOR: quic: remove connection arg
from qc_new_conn()"). The connection will be mandatory when the QUIC
connection is created on backend side to fix an issue when we try to reuse a
TLS session.

So, the connection is again an argument of qc_new_conn(), the 4th
argument. It is NULL for frontend QUIC connections but there is no special
check on it.

6 days agoBUG/MINOR: ssl: Don't allow to set NULL sni
Christopher Faulet [Fri, 5 Dec 2025 08:41:03 +0000 (09:41 +0100)] 
BUG/MINOR: ssl: Don't allow to set NULL sni

ssl_sock_set_servername() function was documented to support NULL sni to
unset it. However, the man page of SSL_get_servername() does not mentionned
it is supported or not. And it is in fact not supported by WolfSSL and leads
to a crash if we do so.

For now, this function is never called with a NULL sni, so it better and
safer to forbid this case. Now, if the sni is NULL, the function does
nothing.

This patch could be backported to all stable versions.

6 days agoREGTESTS: quic/ssl: Add ssl_curves_selection.vtc
Frederic Lecaille [Fri, 5 Dec 2025 18:25:40 +0000 (19:25 +0100)] 
REGTESTS: quic/ssl: Add ssl_curves_selection.vtc

This reg test ensures the curves may be correctly set for frontend
and backends by "ssl-default-bind-curves" and "ssl-default-server-curves"
as global options or with "curves" options on "bind" and "server" lines.

6 days agoBUG/MINOR: quic: do not set first the default QUIC curves
Frederic Lecaille [Tue, 25 Nov 2025 19:45:27 +0000 (20:45 +0100)] 
BUG/MINOR: quic: do not set first the default QUIC curves

This patch impacts both the QUIC frontends and listeners.

Note that "ssl-default-bind-ciphersuites", "ssl-default-bind-curves",
are not ignored by QUIC by the frontend. This is also the case for the
backends with "ssl-default-server-ciphersuites" and "ssl-default-server-curves".

These settings are set by ssl_sock_prepare_ctx() for the frontends and
by ssl_sock_prepare_srv_ssl_ctx() for the backends. But ssl_quic_initial_ctx()
first sets the default QUIC frontends (see <quic_ciphers> and <quic_groups>)
before these ssl_sock.c function are called, leading some TLS stack to
refuse them if they do not support them. This is the case for some OpenSSL 3.5
stack with FIPS support. They do not support X25519.

To fix this, set the default QUIC ciphersuites and curves only if not already
set by the settings mentioned above.

Rename <quic_ciphers> global variable to <default_quic_ciphersuites>
and <quic_groups> to <default_quic_curves> to reflect the OpenSSL API naming.

These options are taken into an account by ssl_quic_initial_ctx()
which inspects these four variable before calling SSL_CTX_set_ciphersuites()
with <default_quic_ciphersuites> as parameter and SSL_CTX_set_curves() with
<default_quic_curves> as parameter if needed, that is to say, if no ciphersuites
and curves were set by "ssl-default-bind-ciphersuites", "ssl-default-bind-curves"
as global options  or "ciphersuites", "curves" as "bind" line options.
Note that the bind_conf struct is not modified when no "ciphersuites" or
"curves" option are used on "bind" lines.

On backend side, rely on ssl_sock_init_srv() to set the server ciphersuites
and curves. This function is modified to use respectively <default_quic_ciphersuites>
and <default_quic_curves> if no ciphersuites  and curves were set by
"ssl-default-server-ciphersuites", "ssl-default-server-curves" as global options
or "ciphersuites", "curves" as "server" line options.

Thank to @rwagoner for having reported this issue in GH #3194 when using
an OpenSSL 3.5.4 stack with FIPS support.

Must be backported as far as 2.6

6 days agoREGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)
Frederic Lecaille [Thu, 4 Dec 2025 20:05:23 +0000 (21:05 +0100)] 
REGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)

This reg test ensures the ciphersuites may be correctly set for frontend
and backends by "ssl-default-bind-ciphersuites" and "ssl-default-server-ciphersuites"
as global options or with "ciphersuites" options on "bind" and "server" lines.

6 days agoREGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC
Frederic Lecaille [Wed, 3 Dec 2025 10:33:39 +0000 (11:33 +0100)] 
REGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC

ssl/add_ssl_crt-list.vtc was renamed to ssl/add_ssl_crt-list.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then add_ssl_crt-list.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_curve_name.vtc supported by QUIC
Frederic Lecaille [Wed, 3 Dec 2025 09:37:48 +0000 (10:37 +0100)] 
REGTESTS: quic: ssl_curve_name.vtc supported by QUIC

ssl/ssl_curve_name.vtc was renamed to ssl/ssl_curve_name.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_curve_name.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

Note that this script works by chance for QUIC because the curves
selection matches the default ones used by QUIC.

6 days agoREGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC
Frederic Lecaille [Tue, 2 Dec 2025 16:36:33 +0000 (17:36 +0100)] 
REGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC

ssl/ssl_sni_auto.vtc was renamed to ssl/ssl_sni_auto.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_sni_auto.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

Mark the test as broken for QUIC

6 days agoREGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 08:44:00 +0000 (09:44 +0100)] 
REGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC

ssl/ssl_simple_crt-list.vtc was renamed to ssl/ssl_simple_crt-list.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_simple_crt-list.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_server_samples.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 07:00:53 +0000 (08:00 +0100)] 
REGTESTS: quic: ssl_server_samples.vtc supported by QUIC

ssl/ssl_server_samples.vtc was renamed to ssl/ssl_server_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_server_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 06:45:07 +0000 (07:45 +0100)] 
REGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC

ssl/ssl_frontend_samples.vtc was renamed to ssl/ssl_frontend_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_frontend_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 06:28:32 +0000 (07:28 +0100)] 
REGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC

ssl/new_del_ssl_crlfile.vtc was renamed to ssl/new_del_ssl_crlfile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then new_del_ssl_crlfile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_default_server.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 18:12:03 +0000 (19:12 +0100)] 
REGTESTS: quic: ssl_default_server.vtc supported by QUIC

ssl/ssl_default_server.vtc was renamed to ssl/ssl_default_server.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_default_server.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_client_samples.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:50:36 +0000 (18:50 +0100)] 
REGTESTS: quic: ssl_client_samples.vtc supported by QUIC

ssl/ssl_client_samples.vtc was renamed to ssl/ssl_client_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_client_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ssl_client_auth.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:44:56 +0000 (18:44 +0100)] 
REGTESTS: quic: ssl_client_auth.vtc supported by QUIC

ssl/ssl_client_auth.vtc was renamed to ssl/ssl_client_auth.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_client_auth.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:37:35 +0000 (18:37 +0100)] 
REGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC

ssl/show_ssl_ocspresponse.vtc was renamed to ssl/show_ssl_ocspresponse.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then show_ssl_ocspresponse.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:31:19 +0000 (18:31 +0100)] 
REGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC

ssl/set_ssl_server_cert.vtc was renamed to ssl/set_ssl_server_cert.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_server_cert.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:25:01 +0000 (18:25 +0100)] 
REGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC

ssl/set_ssl_crlfile.vtc was renamed to ssl/set_ssl_crlfile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_crlfile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: set_ssl_cert.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:03:55 +0000 (18:03 +0100)] 
REGTESTS: quic: set_ssl_cert.vtc supported by QUIC

ssl/set_ssl_cert.vtc was renamed to ssl/set_ssl_cert.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cert.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 16:52:24 +0000 (17:52 +0100)] 
REGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC

ssl/set_ssl_cert_noext.vtc was renamed to ssl/set_ssl_cert_noext.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cert_noext.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: set_ssl_cafile.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 14:47:40 +0000 (15:47 +0100)] 
REGTESTS: quic: set_ssl_cafile.vtc supported by QUIC

ssl/set_ssl_cafile.vtc was renamed to ssl/set_ssl_cafile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cafile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoBUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send
Frederic Lecaille [Mon, 1 Dec 2025 15:42:52 +0000 (16:42 +0100)] 
BUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send

This is the same issue as the one fixed by this commit:
   BUG/MINOR: quic-be: handshake errors without connection stream closure
But this time this is when the client has to send an alert to the server.
The fix consists in creating the mux after having set the handshake connection
error flag and error_code.

This bug was revealed by ssl/set_ssl_cafile.vtc reg test.

Depends on this commit:
     MINOR: quic: avoid code duplication in TLS alert callback

Must be backported to 3.3

6 days agoMINOR: quic: avoid code duplication in TLS alert callback
Frederic Lecaille [Mon, 1 Dec 2025 15:35:58 +0000 (16:35 +0100)] 
MINOR: quic: avoid code duplication in TLS alert callback

Both the OpenSSL QUIC API TLS alert callback ha_quic_ossl_alert() does exactly
the same thing than the one for quictls API, even if the parameter have different
types.

Call ha_quic_send_alert() quictls callback from ha_quic_ossl_alert OpenSSL
QUIC API callback to avoid such code duplication.

6 days agoREGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 14:27:01 +0000 (15:27 +0100)] 
REGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC

ssl/set_ssl_bug_2265.vtc was renamed to ssl/set_ssl_bug_2265.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_bug_2265.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: ocsp_auto_update.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 10:47:05 +0000 (11:47 +0100)] 
REGTESTS: quic: ocsp_auto_update.vtc supported by QUIC

ssl/ocsp_auto_update.vtc was renamed to ssl/ocsp_auto_update.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ocsp_auto_update.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

6 days agoREGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 16:37:43 +0000 (17:37 +0100)] 
REGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC

ssl/new_del_ssl_cafile.vtc was rename to ssl/new_del_ssl_cafile.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then new_del_ssl_cafile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC connection and "stream" for TCP connections);

6 days agoREGTESTS: quic: issuers_chain_path.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 16:06:43 +0000 (17:06 +0100)] 
REGTESTS: quic: issuers_chain_path.vtc supported by QUIC

ssl/issuers_chain_path.vtc was rename to ssl/issuers_chain_path.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then issuers_chain_path.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC connection and "stream" for TCP connections);

6 days agoREGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 15:43:41 +0000 (16:43 +0100)] 
REGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC

ssl/dynamic_server_ssl.vtc was rename to ssl/dynamic_server_ssl.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then dynamic_server_ssl.vtc were created both under ssl and quic directories
to call the .vtci file with correct VTC_SOCK_TYPE environment value.

Note that VTC_SOCK_TYPE may be resolved in haproxy -cli { } sections.

6 days agoREGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC
Frederic Lecaille [Wed, 26 Nov 2025 17:03:48 +0000 (18:03 +0100)] 
REGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC

Extract from ssl/del_ssl_crt-list.vtc the common part to produce
ssl/del_ssl_crt-list.vtci which may be reused by QUIC and TCP
from respectively quic/del_ssl_crt-list.vtc and ssl/del_ssl_crt-list.vtc
thanks to "include" VTC command and VTC_SOCK_TYPE special vtest environment
variable.

6 days agoREGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory
Frederic Lecaille [Wed, 26 Nov 2025 14:21:51 +0000 (15:21 +0100)] 
REGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory

Move all these files and others for OCSP tests found into reg-tests/ssl
to reg-test/ssl/certs and adapt all the VTC files which use them.

This patch is needed by other tests which have to include the SSL tests.
Indeed, some VTC commands contain paths to these files which cannot
be customized with environment variables, depending on the location the VTC file
is runi from, because VTC does not resolve the environment variables. Only macros
as ${testdir} can be resolved.

For instance this command run from a VTC file from reg-tests/ssl directory cannot
be reused from another directory, except if we add a symbolic link for each certs,
key etc.

 haproxy h1 -cli {
   send "del ssl crt-list ${testdir}/localhost.crt-list ${testdir}/common.pem:1"
 }

This is not what we want. We add a symbolic link to reg-test/ssl/certs to the
directory and modify the command above as follows:

 haproxy h1 -cli {
   send "del ssl crt-list ${testdir}/certs/localhost.crt-list ${testdir}/certs/common.pem:1"
 }

6 days agoMINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()
Frederic Lecaille [Fri, 28 Nov 2025 10:54:23 +0000 (11:54 +0100)] 
MINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()

Traces were missing in this function.
Also add information about the connection struct from qc->conn when
initialized for all the traces.

Should be easily backported as far as 2.6.

6 days agoBUG/MINOR: quic-be: handshake errors without connection stream closure
Frederic Lecaille [Fri, 28 Nov 2025 10:27:54 +0000 (11:27 +0100)] 
BUG/MINOR: quic-be: handshake errors without connection stream closure

This bug was revealed on backend side by reg-tests/ssl/del_ssl_crt-list.vtc when
run wich QUIC connections. As expected by the test, a TLS alert is generated on
servsr side. This latter sands a CONNECTION_CLOSE frame with a CRYPTO error
(>= 0x100). In this case the client closes its QUIC connection. But
the stream connection was not informed. This leads the connection to
be closed after the server timeout expiration. It shouls be closed asap.
This is the reason why reg-tests/ssl/del_ssl_crt-list.vtc could succeeds
or failed, but only after a 5 seconds delay.

To fix this, mimic the ssl_sock_io_cb() for TCP/SSL connections. Call
the same code this patch implements with ssl_sock_handle_hs_error()
to correctly handle the handshake errors. Note that some SSL counters
were not incremented for both the backends and frontends. After such
errors, ssl_sock_io_cb() start the mux after the connection has been
flagged in error. This has as side effect to close the stream
in conn_create_mux().

Must be backported to 3.3 only for backends. This is not sure at this time
if this bug may impact the frontends.

6 days agoBUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces
Frederic Lecaille [Thu, 27 Nov 2025 10:22:46 +0000 (11:22 +0100)] 
BUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces

Such crashes may occur for QUIC frontends only when the SSL traces are enabled.

ssl_sock_switchctx_cbk() ClientHello callback may be called without any connection
initialize (<conn>) for QUIC connections leading to crashes when passing
conn->err_code to TRACE_ERROR().

Modify the TRACE_ERROR() statement to pass this parameter only when <conn> is
initialized.

Must be backported as far as 3.2.

10 days agoDOC: config: reorder the cache section's keywords
Willy Tarreau [Thu, 4 Dec 2025 14:44:38 +0000 (15:44 +0100)] 
DOC: config: reorder the cache section's keywords

Probably due to historical accumulation, keywords were in a random
order that doesn't help when looking them up. Let's just reorder them
in alphabetical order like other sections. This can be backported.

10 days agoDOC: config: mention clearer that the cache's total-max-size is mandatory
Willy Tarreau [Thu, 4 Dec 2025 14:42:09 +0000 (15:42 +0100)] 
DOC: config: mention clearer that the cache's total-max-size is mandatory

As reported in GH issue #3201, it's easy to overlook this, so let's make
it clearer by mentioning the keyword. This can be backported to all
versions.

10 days agoBUG/MEDIUM: config: ignore empty args in skipped blocks
Willy Tarreau [Thu, 4 Dec 2025 14:21:21 +0000 (15:21 +0100)] 
BUG/MEDIUM: config: ignore empty args in skipped blocks

As returned by Christian Ruppert in GH issue #3203, we're having an
issue with checks for empty args in skipped blocks: the check is
performed after the line is tokenized, without considering the case
where it's disabled due to outer false .if/.else conditions. Because
of this, a test like this one:

    .if defined(SRV1_ADDR)
        server srv1 "$SRV1_ADDR"
    .endif

will fail when SRV1_ADDR is empty or not set, saying that this will
result in an empty arg on the line.

The solution consists in postponing this check after the conditions
evaluation so that disabled lines are already skipped. And for this
to be possible, we need to move "errptr" one level above so that it
remains accessible there.

This will need to be backported to 3.3 and wherever commit 1968731765
("BUG/MEDIUM: config: solve the empty argument problem again") is
backported. As such it is also related to GH issue #2367.

10 days agoBUG/MEDIUM: connection: fix "bc_settings_streams_limit" typo
Willy Tarreau [Thu, 4 Dec 2025 13:46:51 +0000 (14:46 +0100)] 
BUG/MEDIUM: connection: fix "bc_settings_streams_limit" typo

The keyword was correct in the doc but in the code it was spelled
with a missing 's' after 'settings', making it unavailable. Since
there was no other way to find this but reading the code, it's safe
to simply fix it and assume nobody relied on the wrong spelling.

In the worst case for older backports it can also be duplicated.

This must be backported to 3.0.

10 days agoREGTESTS: ssl: split tls*_reuse in stateless and stateful resume tests 20251204-regtests-resume
William Lallemand [Thu, 4 Dec 2025 13:02:01 +0000 (14:02 +0100)] 
REGTESTS: ssl: split tls*_reuse in stateless and stateful resume tests

Simplify ssl_reuse.vtci so it can be started with variables:

- SSL_CACHESIZE allow to specify the size of the session cache size for
  the frontend
- NO_TLS_TICKETS allow to specify the "no-tls-tickets" option on bind

It introduces these files:

- ssl/tls12_resume_stateful.vtc
- ssl/tls12_resume_stateless.vtc
- ssl/tls13_resume_stateless.vtc
- ssl/tls13_resume_stateful.vtc
- quic/tls13_resume_stateless.vtc
- quic/tls13_resume_stateful.vtc
- quic/tls13_0rtt_stateful.vtc
- quic/tls13_0rtt_stateless.vtc

stateful files have "no-tls-tickets" + tune.tls.cachesize 20000
stateless files have "tls-tickets" + tune.tls.cachesize 0

This allows to enable AWS-LC on TCP TLS1.2 and TCP TL1.3+tickets.

TLS1.2+stateless does not seem to work on WolfSSL.

10 days agoREGTESTS: ssl enable tls12_reuse.vtc for AWS-LC
William Lallemand [Thu, 4 Dec 2025 10:40:04 +0000 (11:40 +0100)] 
REGTESTS: ssl enable tls12_reuse.vtc for AWS-LC

The TLS resume test was never started with AWS-LC because the TLS1.3
part was not working. Since we split the reg-tests with a TLS1.2 part
and a TLS1.3 part, we can enable the tls1.2 part for AWS-LC.

11 days agoBUG/MINOR: quic-be: Missing keywords array NULL termination
Frederic Lecaille [Wed, 3 Dec 2025 10:07:47 +0000 (11:07 +0100)] 
BUG/MINOR: quic-be: Missing keywords array NULL termination

This bug arrived with this commit:
     MINOR: quic: implement cc-algo server keyword
where <srv> keywords list with a missing array NULL termination inside was
introduced to parse the QUIC backend CC algorithms.

Detected by ASAN during ssl/add_ssl_crt-list.vtc execution as follows:

***  h1    debug|==4066081==ERROR: AddressSanitizer: global-buffer-overflow on address 0x5562e31dedb8 at pc 0x5562e298951f bp 0x7ffe9f9f2b40 sp 0x7ffe9f9f2b38
***  h1    debug|READ of size 8 at 0x5562e31dedb8 thread T0
**** dT    0.173
***  h1    debug|    #0 0x5562e298951e in srv_find_kw src/server.c:789
***  h1    debug|    #1 0x5562e2989630 in _srv_parse_kw src/server.c:3847
***  h1    debug|    #2 0x5562e299db1f in parse_server src/server.c:4024
***  h1    debug|    #3 0x5562e2c86ea4 in cfg_parse_listen src/cfgparse-listen.c:593
***  h1    debug|    #4 0x5562e2b0ede9 in parse_cfg src/cfgparse.c:2708
***  h1    debug|    #5 0x5562e2c47d48 in read_cfg src/haproxy.c:1077
***  h1    debug|    #6 0x5562e2682055 in main src/haproxy.c:3366
***  h1    debug|    #7 0x7ff3ff867249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
***  h1    debug|    #8 0x7ff3ff867304 in __libc_start_main_impl ../csu/libc-start.c:360
***  h1    debug|    #9 0x5562e26858d0 in _start (/home/flecaille/src/haproxy/haproxy+0x2638d0)
***  h1    debug|
***  h1    debug|0x5562e31dedb8 is located 40 bytes to the left of global variable 'bind_kws' defined in 'src/cfgparse-quic.c:255:28' (0x5562e31dede0) of size 120
***  h1    debug|0x5562e31dedb8 is located 0 bytes to the right of global variable 'srv_kws' defined in 'src/cfgparse-quic.c:264:27' (0x5562e31ded80) of size 56
***  h1    debug|SUMMARY: AddressSanitizer: global-buffer-overflow src/server.c:789 in srv_find_kw
***  h1    debug|Shadow bytes around the buggy address:
***  h1    debug|  0x0aacdc633d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
***  h1    debug|  0x0aacdc633d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
***  h1    debug|  0x0aacdc633d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
***  h1    debug|  0x0aacdc633d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
***  h1    debug|  0x0aacdc633da0: 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
***  h1    debug|=>0x0aacdc633db0: 00 00 00 00 00 00 00[f9]f9 f9 f9 f9 00 00 00 00
***  h1    debug|  0x0aacdc633dc0: 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9
***  h1    debug|  0x0aacdc633dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
***  h1    debug|  0x0aacdc633de0: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 f9
***  h1    debug|  0x0aacdc633df0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
***  h1    debug|  0x0aacdc633e00: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
***  h1    debug|Shadow byte legend (one shadow byte represents 8 application bytes):

This should be backported where the commit above is supposed to be backported.

13 days agoMINOR: quic: implement cc-algo server keyword
Amaury Denoyelle [Thu, 27 Nov 2025 15:25:42 +0000 (16:25 +0100)] 
MINOR: quic: implement cc-algo server keyword

Extend QUIC server configuration so that congestion algorithm and
maximum window size can be set on the server line. This can be achieved
using quic-cc-algo keyword with a syntax similar to a bind line.

This should be backported up to 3.3 as this feature is considered as
necessary for full QUIC backend support. Note that this relies on the
serie of previous commits which should be picked first.

13 days agoMINOR: quic: extract cc-algo parsing in a dedicated function
Amaury Denoyelle [Thu, 27 Nov 2025 15:25:07 +0000 (16:25 +0100)] 
MINOR: quic: extract cc-algo parsing in a dedicated function

Extract code from bind_parse_quic_cc_algo() related to pure parsing of
quic-cc-algo keyword. The objective is to be able to quickly duplicate
this option on the server line.

This may need to be backported to support QUIC congestion control
algorithm support on the server line in version 3.3.

13 days agoMINOR: quic: define quic_cc_algo as const
Amaury Denoyelle [Mon, 1 Dec 2025 12:53:59 +0000 (13:53 +0100)] 
MINOR: quic: define quic_cc_algo as const

Each QUIC congestion algorithm is defined as a structure with callbacks
in it. Every quic_conn has a member pointing to the configured
algorithm, inherited from the bind-conf keyword or to the default CUBIC
value.

Convert all these definitions to const. This ensures that there never
will be an accidental modification of a globally shared structure. This
also requires to mark quic_cc_algo field in bind_conf and quic_cc as
const.

13 days agoRevert "MINOR: quic: use dynamic cc_algo on bind_conf"
Amaury Denoyelle [Mon, 1 Dec 2025 11:44:50 +0000 (12:44 +0100)] 
Revert "MINOR: quic: use dynamic cc_algo on bind_conf"

This reverts commit a6504c9cfb6bb48ae93babb76a2ab10ddb014a79.

Each supported QUIC algo are associated with a set of callbacks defined
in a structure quic_cc_algo. Originally, bind_conf would use a constant
pointer to one of these definitions.

During pacing implementation, this field was transformed into a
dynamically allocated value copied from the original definition. The
idea was to be able to tweak settings at the listener level. However,
this was never used in practice. As such, revert to the original model.

This may need to be backported to support QUIC congestion control
algorithm support on the server line in version 3.3.

2 weeks agoDOC: configuration: ECH support details
William Lallemand [Sun, 30 Nov 2025 08:44:20 +0000 (09:44 +0100)] 
DOC: configuration: ECH support details

Specify which OpenSSL branch is supported and that AWS-LC is not
supported.

Must be backported to 3.3.

2 weeks agoBUG/MINOR: jwt: Missing "case" in switch statement
Remi Tricot-Le Breton [Fri, 28 Nov 2025 13:50:36 +0000 (14:50 +0100)] 
BUG/MINOR: jwt: Missing "case" in switch statement

Because of missing "case" keyword in front of the values in a switch
case statement, the values were interpreted as goto tags and the switch
statement became useless.

This patch should fix GitHub issue #3200.
The fix should be backported up to 2.8.

2 weeks ago[RELEASE] Released version 3.4-dev0 v3.4-dev0
Willy Tarreau [Wed, 26 Nov 2025 15:12:45 +0000 (16:12 +0100)] 
[RELEASE] Released version 3.4-dev0

Released version 3.4-dev0 with the following main changes :
    - MINOR: version: mention that it's development again

2 weeks agoMINOR: version: mention that it's development again
Willy Tarreau [Wed, 26 Nov 2025 15:11:47 +0000 (16:11 +0100)] 
MINOR: version: mention that it's development again

This essentially reverts d8ba9a2a92.

2 weeks ago[RELEASE] Released version 3.3.0 v3.3.0
Willy Tarreau [Wed, 26 Nov 2025 14:55:57 +0000 (15:55 +0100)] 
[RELEASE] Released version 3.3.0

Released version 3.3.0 with the following main changes :
    - BUG/MINOR: acme: better challenge_ready processing
    - BUG/MINOR: acme: warning â\80\98ctxâ\80\99 may be used uninitialized
    - MINOR: httpclient: complete the https log
    - BUG/MEDIUM: server: do not use default SNI if manually set
    - BUG/MINOR: freq_ctr: Prevent possible signed overflow in freq_ctr_overshoot_period
    - DOC: ssl: Document the restrictions on 0RTT.
    - DOC: ssl: Note that 0rtt works fork QUIC with QuicTLS too.
    - BUG/MEDIUM: quic: do not prevent sending if no BE token
    - BUG/MINOR: quic/server: free quic_retry_token on srv drop
    - MINOR: quic: split global CID tree between FE and BE sides
    - MINOR: quic: use separate global quic_conns FE/BE lists
    - MINOR: quic: add "clo" filter on show quic
    - MINOR: quic: dump backend connections on show quic
    - MINOR: quic: mark backend conns on show quic
    - BUG/MINOR: quic: fix uninit list on show quic handler
    - BUG/MINOR: quic: release BE quic_conn on connect failure
    - BUG/MINOR: server: fix srv_drop() crash on partially init srv
    - BUG/MINOR: h3: do no crash on forwarding multiple chained response
    - BUG/MINOR: h3: handle properly buf alloc failure on response forwarding
    - BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set
    - BUG/MINOR: acme: fix ha_alert() call
    - Revert "BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set"
    - BUG/MINOR: sock-inet: ignore conntrack for transparent sockets on Linux
    - DEV: patchbot: prepare for new version 3.4-dev
    - DOC: update INSTALL with the range of gcc compilers and openssl versions
    - MINOR: version: mention that 3.3 is stable now

2 weeks agoMINOR: version: mention that 3.3 is stable now
Willy Tarreau [Wed, 26 Nov 2025 14:54:30 +0000 (15:54 +0100)] 
MINOR: version: mention that 3.3 is stable now

This version will be maintained up to around Q1 2027. The INSTALL file
also mentions it.

2 weeks agoDOC: update INSTALL with the range of gcc compilers and openssl versions
Willy Tarreau [Wed, 26 Nov 2025 14:50:43 +0000 (15:50 +0100)] 
DOC: update INSTALL with the range of gcc compilers and openssl versions

Gcc 4.7 to 15 are tested. OpenSSL was tested up to 3.6. QUIC support
requires OpenSSL >= 3.5.2.

2 weeks agoDEV: patchbot: prepare for new version 3.4-dev
Willy Tarreau [Wed, 26 Nov 2025 14:35:22 +0000 (15:35 +0100)] 
DEV: patchbot: prepare for new version 3.4-dev

The bot will now load the prompt for the upcoming 3.4 version so we have
to rename the files and update their contents to match the current version.

2 weeks agoBUG/MINOR: sock-inet: ignore conntrack for transparent sockets on Linux
Willy Tarreau [Wed, 26 Nov 2025 09:10:17 +0000 (10:10 +0100)] 
BUG/MINOR: sock-inet: ignore conntrack for transparent sockets on Linux

As reported in github issue #3192, in certain situations with transparent
listeners, it is possible to get the incoming connection's destination
wrong via SO_ORIGINAL_DST. Two cases were identified thus far:
  - incorrect conntrack configuration where NOTRACK is used only on
    incoming packets, resulting in reverse connections being created
    from response packets. It's then mostly a matter of timing, i.e.
    whether or not the connection is confirmed before the source is
    retrieved, but in this case the connection's destination address
    as retrieved by SO_ORIGINAL_DST is the client's address.

  - late outgoing retransmit that recreates a just expired conntrack
    entry, in reverse direction as well. It's possible that combinations
    of RST or FIN might play a role here in speeding up conntrack eviction,
    as well as the rollover of source ports on the client whose new
    connection matches an older one and simply refreshes it due to
    nf_conntrack_tcp_loose being set by default.

TPROXY doesn't require conntrack, only REDIRECT, DNAT etc do. However
the system doesn't offer any option to know how a conntrack entry was
created (i.e. normally or via a response packet) to let us know that
it's pointless to check the original destination, nor does it permit
to access the local vs peer addresses in opposition to src/dst which
can be wrong in this case.

One alternate approach could consist in only checking SO_ORIGINAL_DST
for listening sockets not configured with the "transparent" option,
but the problem here is that our low-level API only works with FDs
without knowing their purpose, so it's unknown there that the fd
corresponds to a listener, let alone in transparent mode.

A (slightly more expensive) variant of this approach here consists in
checking on the socket itself that it was accepted in transparent mode
using IP_TRANSPARENT, and skip SO_ORIGINAL_DST if this is the case.
This does the job well enough (no more client addresses appearing in
the dst field) and remains a good compromise. A future improvement of
the API could permit to pass the transparent flag down the stack to
that function.

This should be backported to stable versions after some observation
in latest -dev.

For reference, here are some links to older conversations on that topic
that Lukas found during this analysis:

  https://lists.openwall.net/netdev/2019/01/12/34
  https://discourse.haproxy.org/t/send-proxy-not-modifying-some-traffic-with-proxy-ip-port-details/3336/9
  https://www.mail-archive.com/haproxy@formilux.org/msg32199.html
  https://lists.openwall.net/netdev/2019/01/23/114

2 weeks agoRevert "BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none...
Christopher Faulet [Wed, 26 Nov 2025 10:05:14 +0000 (11:05 +0100)] 
Revert "BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set"

This reverts commit de29000e602bda55d32c266252ef63824e838ac0.

The fix was in fact invalid. First it is not supprted by WolfSSL to call
SSL_set_tlsext_host_name with a hostname to NULL. Then, it is not specified
as supported by other SSL libraries.

But, by reviewing the root cause of this bug, it appears there is an issue
with the reuse of TLS sesisons. It must not be performed if the SNI does not
match. A TLS session created with a SNI must not be reused with another
SNI. The side effects are not clear but functionnaly speaking, it is
invalid.

So, for now, the commit above was reverted because it is invalid and it
crashes with WolfSSL. Then the init of the SSL connection must be reworked
to get the SNI earlier, to be able to reuse or not an existing TLS
session.

2 weeks agoBUG/MINOR: acme: fix ha_alert() call
Maxime Henrion [Tue, 25 Nov 2025 17:37:02 +0000 (12:37 -0500)] 
BUG/MINOR: acme: fix ha_alert() call

A NULL pointer was passed as the format string, so this alert message
was never written.

Must be backported to 3.2.

2 weeks agoBUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set
Christopher Faulet [Mon, 24 Nov 2025 13:41:54 +0000 (14:41 +0100)] 
BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set

When a new SSL server connection is created, if no SNI is set, it is
possible to inherit from the one of the reused TLS session. The bug was
introduced by the commit 95ac5fe4a ("MEDIUM: ssl_sock: always use the SSL's
server name, not the one from the tid"). The mixup is possible between
regular connections but also with health-checks connections.

To fix the issue, when no SNI is set, for regular server connections and for
health-check connections, the SNI must explicitly be disabled by calling
ssl_sock_set_servername() with the hostname set to NULL.

Many thanks to Lukas for his detailed bug report.

This patch should fix the issue #3195. It must be backported as far as 3.0.

2 weeks agoBUG/MINOR: h3: handle properly buf alloc failure on response forwarding
Amaury Denoyelle [Tue, 25 Nov 2025 14:46:14 +0000 (15:46 +0100)] 
BUG/MINOR: h3: handle properly buf alloc failure on response forwarding

Replace BUG_ON() for buffer alloc failure on h3_resp_headers_to_htx() by
proper error handling. An error status is reported which should be
sufficient to initiate connection closure.

No need to backport.

2 weeks agoBUG/MINOR: h3: do no crash on forwarding multiple chained response
Amaury Denoyelle [Tue, 25 Nov 2025 14:38:39 +0000 (15:38 +0100)] 
BUG/MINOR: h3: do no crash on forwarding multiple chained response

h3_resp_headers_to_htx() is the function used to convert an HTTP/3
response into a HTX message. It was introduced on this release for QUIC
backend support.

A BUG_ON() would occur if multiple responses are forwarded
simultaneously on a stream without rcv_buf in between. Fix this by
removing it. Instead, if QCS HTX buffer is not empty when handling with
a new response, prefer to pause demux operation. This is restarted when
the buffer has been read and emptied by the upper stream layer.

No need to backport.

2 weeks agoBUG/MINOR: server: fix srv_drop() crash on partially init srv
Amaury Denoyelle [Tue, 25 Nov 2025 14:07:51 +0000 (15:07 +0100)] 
BUG/MINOR: server: fix srv_drop() crash on partially init srv

A recent patch has introduced free operation for QUIC tokens stored in a
server. These values are located in <per_thr> server array.

However, a server instance may be released prior to its full
initialization in case of a failure during "add server" CLI command. The
mentionned patch would cause a srv_drop() crash due to an invalid usage
of NULL <per_thr> member.

Fix this by adding a check on <per_thr> prior to dereference it in
srv_drop().

No need to backport.

2 weeks agoBUG/MINOR: quic: release BE quic_conn on connect failure
Amaury Denoyelle [Tue, 25 Nov 2025 13:37:50 +0000 (14:37 +0100)] 
BUG/MINOR: quic: release BE quic_conn on connect failure

If quic_connect_server() fails, quic_conn FD will remain unopened as set
to -1. Backend connections do not have a fallback socket for future
exchange, contrary to frontend one which can use the listener FD. As
such, it is better to release these connections early.

This patch adjusts such failure by extending quic_close(). This function
is called by the upper layer immediately after a connect issue. In this
case, release immediately a quic_conn backend instance if the FD is
unset, which means that connect has previously failed.

Also, quic_conn_release() is extended to ensure that such faulty
connections are immediately freed and not converted into a
quic_conn_closed instance.

Prior to this patch, a backend quic_conn without any FD would remain
allocated and possibly active. If its tasklet is executed, this resulted
in a crash due to access to an invalid FD.

No need to backport.

2 weeks agoBUG/MINOR: quic: fix uninit list on show quic handler
Amaury Denoyelle [Tue, 25 Nov 2025 13:46:37 +0000 (14:46 +0100)] 
BUG/MINOR: quic: fix uninit list on show quic handler

A recent patch has extended "show quic" capability. It is now possible
to list a specific list of connections, either active frontend, closing
frontend or backend connections.

An issue was introduced as the list is local storage. As this command is
reentrant, show quic context must be extended so that the currently
inspected list is also saved.

This issue was reported via GCC which mentions an uninitilized value
depending on branching conditions.

2 weeks agoMINOR: quic: mark backend conns on show quic
Amaury Denoyelle [Mon, 24 Nov 2025 13:24:23 +0000 (14:24 +0100)] 
MINOR: quic: mark backend conns on show quic

Add an extra "(B)" marker when displaying a backend connection during a
"show quic". This is useful to differentiate them with the frontend side
when displaying all connections.

2 weeks agoMINOR: quic: dump backend connections on show quic
Amaury Denoyelle [Mon, 24 Nov 2025 14:00:24 +0000 (15:00 +0100)] 
MINOR: quic: dump backend connections on show quic

Add a new "be" filter to "show quic". Its purpose is to be able to
display backend connections. These connections can also be listed using
"all" filter.

2 weeks agoMINOR: quic: add "clo" filter on show quic
Amaury Denoyelle [Mon, 24 Nov 2025 13:58:55 +0000 (14:58 +0100)] 
MINOR: quic: add "clo" filter on show quic

Add a new filter "clo" for "show quic" command. Its purpose is to filter
output to only list closing frontend connections.

2 weeks agoMINOR: quic: use separate global quic_conns FE/BE lists
Amaury Denoyelle [Mon, 24 Nov 2025 09:28:36 +0000 (10:28 +0100)] 
MINOR: quic: use separate global quic_conns FE/BE lists

Each quic_conn instance is stored in a global list. Its purpose is to be
able to loop over all known connections during "show quic".

Split this into two separate lists for frontend and backend usage.
Another change is that closing backend connections do not move into
quic_conns_clo list. They remain instead in their original list. The
objective of this patch is to reduce the contention between the two
sides.

Note that this prevents backend connections to be listed in "show quic"
now. This will be adjusted in a future patch.

2 weeks agoMINOR: quic: split global CID tree between FE and BE sides
Amaury Denoyelle [Fri, 21 Nov 2025 16:21:26 +0000 (17:21 +0100)] 
MINOR: quic: split global CID tree between FE and BE sides

QUIC CIDs are stored in a global tree. Prior to this patch, CIDs used on
both frontend and backend sides were mixed together.

This patch implement CID storage separation between FE and BE sides. The
original tre quic_cid_trees is splitted as
quic_fe_cid_trees/quic_be_cid_trees.

This patch should reduce contention between frontend and backend usages.
Also, it should reduce the risk of random CID collision.

2 weeks agoBUG/MINOR: quic/server: free quic_retry_token on srv drop
Amaury Denoyelle [Mon, 24 Nov 2025 13:25:14 +0000 (14:25 +0100)] 
BUG/MINOR: quic/server: free quic_retry_token on srv drop

A recent patch has implemented caching of QUIC token received from a
NEW_TOKEN frame into the server cache. This value is stored per thread
into a <quic_retry_token> field.

This field is an ist, first set to an empty string. Via
qc_try_store_new_token(), it is reallocated to fit the size of the newly
stored token. Prior to this patch, the field was never freed so this
causes a memory leak.

Fix this by using istfree() on <quic_retry_token> field during
srv_drop().

No need to backport.

2 weeks agoBUG/MEDIUM: quic: do not prevent sending if no BE token
Amaury Denoyelle [Mon, 24 Nov 2025 17:08:58 +0000 (18:08 +0100)] 
BUG/MEDIUM: quic: do not prevent sending if no BE token

For QUIC client support, a token may be emitted along with INITIAL
packets during the handshake. The token is encoded during emission via
qc_enc_token() called by qc_build_pkt().

The token may be provided from different sources. First, it can be
retrieved via <retry_token> quic_conn member when a Retry packet was
received. If not present, a token may be reused from the server cache,
populated from NEW_TOKEN received from previous a connection.

Prior to this patch, the last method may cause an issue. If the upper
connection instance is released prior to the handshake completion, this
prevents access to a possible server token. This is considered an error
by qc_enc_token(). The error is reported up to calling functions,
preventing any emission to be performed. In the end, this prevented the
either the full quic_conn release or subsizing into quic_conn_closed
until the idle timeout completion (30s by default). With abortonclose
set now by default on HTTP frontends, early client shutdowns can easily
cause excessive memory consumption.

To fix this, change qc_enc_token() so that if connection is closed, no
token is encoded but also no error is reported. This allows to continue
emission and permit early connection release.

No need to backport.

2 weeks agoDOC: ssl: Note that 0rtt works fork QUIC with QuicTLS too.
Olivier Houchard [Tue, 25 Nov 2025 12:17:45 +0000 (13:17 +0100)] 
DOC: ssl: Note that 0rtt works fork QUIC with QuicTLS too.

Document that one can use 0rtt with QUIC when using QuicTLS too.

2 weeks agoDOC: ssl: Document the restrictions on 0RTT.
Olivier Houchard [Tue, 25 Nov 2025 10:02:21 +0000 (11:02 +0100)] 
DOC: ssl: Document the restrictions on 0RTT.

Document that with QUIC, 0RTT only works with OpenSSL >= 3.5.2 and
AWS-LC, and for TLS/TCP, it only works with OpenSSL, and frontends
require that an ALPN be sent by the client to use the early data before
the handshake.

2 weeks agoBUG/MINOR: freq_ctr: Prevent possible signed overflow in freq_ctr_overshoot_period
Jacques Heunis [Wed, 25 Jun 2025 12:22:39 +0000 (13:22 +0100)] 
BUG/MINOR: freq_ctr: Prevent possible signed overflow in freq_ctr_overshoot_period

All of the other bandwidth-limiting code stores limits and intermediate
(byte) counters as unsigned integers. The exception here is
freq_ctr_overshoot_period which takes in unsigned values but returns a
signed value. While this has the benefit of letting the caller know how
far away from overshooting they are, this is not currently leveraged
anywhere in the codebase, and it has the downside of halving the positive
range of the result.

More concretely though, returning a signed integer when all intermediate
values are unsigned (and boundaries are not checked) could result in an
overflow, producing values that are at best unexpected. In the case of
flt_bwlim (the only usage of freq_ctr_overshoot_period in the codebase at
the time of writing), an overflow could cause the filter to wait for a
large number of milliseconds when in fact it shouldn't wait at all.

This is a niche possibility, because it requires that a bandwidth limit is
defined in the range [2^31, 2^32). In this case, the raw limit value would
not fit into a signed integer, and close to the end of the period, the
`(elapsed * freq)/period` calculation could produce a value which also
doesn't fit into a signed integer.

If at the same time `curr` (the number of events counted so far in the
current period) is small, then we could get a very large negative value
which overflows. This is undefined behaviour and could produce surprising
results. The most obvious outcome is flt_bwlim sometimes waiting for a
large amount of time in a case where it shouldn't wait at all, thereby
incorrectly slowing down the flow of data.

Converting just the return type from signed to unsigned (and checking for
the overflow) prevents this undefined behaviour. It also makes the range
of valid values consistent between the input and output of
freq_ctr_overshoot_period and with the input and output of other freq_ctr
functions, thereby reducing the potential for surprise in intermediate
calculations: now everything supports the full 0 - 2^32 range.

2 weeks agoBUG/MEDIUM: server: do not use default SNI if manually set
Amaury Denoyelle [Mon, 24 Nov 2025 10:30:19 +0000 (11:30 +0100)] 
BUG/MEDIUM: server: do not use default SNI if manually set

A new server feature "sni-auto" has been introduced recently. The
objective is to automatically set the SNI value to the host header if no
SNI is explicitely set.

  668916c1a2fc2180028ae051aa805bb71c7b690b
  MEDIUM: server/ssl: Base the SNI value to the HTTP host header by default

There is an issue with it : server SNI is currently always overwritten,
even if explicitely set in the configuration file. Adjust
check_config_validity() to ensure the default value is only used if
<sni_expr> is NULL.

This issue was detected as a memory leak on <sni_expr> was reported when
SNI is explicitely set on a server line.

This patch is related to github feature request #3081.

No need to backport, unless the above patch is.

3 weeks agoMINOR: httpclient: complete the https log
William Lallemand [Sat, 22 Nov 2025 11:29:33 +0000 (12:29 +0100)] 
MINOR: httpclient: complete the https log

The httpsclient_log_format variable lacks a few values in the TLS fields
that are now available as fetches.

On the backend side we have:

"%[fc_err]/%[ssl_fc_err,hex]/%[ssl_c_err]/%[ssl_c_ca_err]/%[ssl_fc_is_resumed] %[ssl_fc_sni]/%sslv/%sslc"

We now have enough sample fetches to have this equivalent in the
httpclient:

"%[bc_err]/%[ssl_bc_err,hex]/%[ssl_c_err]/%[ssl_c_ca_err]/%[ssl_bc_is_resumed] %[ssl_bc_sni]/%[ssl_bc_protocol]/%[ssl_bc_cipher]"

Instead of the current:

"%[bc_err]/%[ssl_bc_err,hex]/-/-/%[ssl_bc_is_resumed] -/-/-"

3 weeks agoBUG/MINOR: acme: warning ‘ctx’ may be used uninitialized
William Lallemand [Fri, 21 Nov 2025 21:59:47 +0000 (22:59 +0100)] 
BUG/MINOR: acme: warning ‘ctx’ may be used uninitialized

Please compiler with maybe-uninitialized warning

src/acme.c: In function ‘cli_acme_chall_ready_parse’:
include/haproxy/task.h:215:9: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized]
  215 |         _task_wakeup(t, f, MK_CALLER(WAKEUP_TYPE_TASK_WAKEUP, 0, 0))
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/acme.c:2903:17: note: in expansion of macro ‘task_wakeup’
 2903 |                 task_wakeup(ctx->task, TASK_WOKEN_MSG);
      |                 ^~~~~~~~~~~
src/acme.c:2862:26: note: ‘ctx’ was declared here
 2862 |         struct acme_ctx *ctx;
      |                          ^~~

Backport to 3.2.

3 weeks agoBUG/MINOR: acme: better challenge_ready processing
William Lallemand [Fri, 21 Nov 2025 21:47:52 +0000 (22:47 +0100)] 
BUG/MINOR: acme: better challenge_ready processing

Improve the challenge_ready processing:

- do a lookup directly instead looping in the task tree
- only do a task_wakeup when every challenges are ready to avoid starting
  the task and stopping it just after
- Compute the number of remaining challenge to setup
- Output a message giving the number of remaining challenges to setup
  and if the task started again.

Backport to 3.2.

3 weeks ago[RELEASE] Released version 3.3-dev14 v3.3-dev14
Willy Tarreau [Fri, 21 Nov 2025 13:13:44 +0000 (14:13 +0100)] 
[RELEASE] Released version 3.3-dev14

Released version 3.3-dev14 with the following main changes :
    - MINOR: stick-tables: Rename stksess shards to use buckets
    - MINOR: quic: do not use quic_newcid_from_hash64 on BE side
    - MINOR: quic: support multiple random CID generation for BE side
    - MINOR: quic: try to clarify quic_conn CIDs fields direction
    - MINOR: quic: refactor qc_new_conn() prototype
    - MINOR: quic: remove <ipv4> arg from qc_new_conn()
    - MEDIUM: mworker: set the mworker-max-reloads to 50
    - BUG/MEDIUM: quic-be: prevent use of MUX for 0-RTT sessions without secrets
    - CLEANUP: startup: move confusing msg variable
    - BUG/MEDIUM: mworker: signals inconsistencies during startup and reload
    - BUG/MINOR: mworker: wrong signals during startup
    - BUG/MINOR: acme: P-256 doesn't work with openssl >= 3.0
    - REGTESTS: ssl: split the SSL reuse test into TLS 1.2/1.3
    - BUILD: Makefile: make install with admin tools
    - CI: github: make install-bin instead of make install
    - BUG/MINOR: ssl: remove dead code in ssl_sock_from_buf()
    - BUG/MINOR: mux-quic: implement max-reuse server parameter
    - MINOR: quic: fix trace on quic_conn_closed release
    - BUG/MINOR: quic: do not decrement jobs for backend conns
    - BUG/MINOR: quic: fix FD usage for quic_conn_closed on backend side
    - BUILD: Makefile: remove halog from install-admin
    - REGTESTS: ssl: add basic 0rtt tests for TLSv1.2, TLSv1.3 and QUIC
    - REGTESTS: ssl: also verify that 0-rtt properly advertises early-data:1
    - MINOR: quic/flags: add missing QUIC flags for flags dev tool.
    - MINOR: quic: uneeded xprt context variable passed as parameter
    - MINOR: limits: keep a copy of the rough estimate of needed FDs in global struct
    - MINOR: limits: explain a bit better what to do when fd limits are exceeded
    - BUG/MEDIUM: quic-be/ssl_sock: TLS callback called without connection
    - BUG/MINOR: acme: alert when the map doesn't exist at startup
    - DOC: acme: add details about the DNS-01 support
    - DOC: acme: explain how to dump the certificates
    - DOC: acme: configuring acme needs a crt file
    - DOC: acme: add details about key pair generation in ACME section
    - BUG/MEDIUM: queues: Don't forget to unlock the queue before exiting
    - MINOR: muxes: Support an optional ALPN string when defining mux protocols
    - MINOR: config: Do proto detection for listeners before checks about ALPN
    - BUG/MEDIUM: config: Use the mux protocol ALPN by default for listeners if forced
    - DOC: config: Add a note about conflict with ALPN/NPN settings and proto keyword
    - MINOR: quic: store source address for backend conns
    - BUG/MINOR: quic: flag conn with CO_FL_FDLESS on backend side
    - ADMIN: dump-certs: let dry-run compare certificates
    - BUG/MEDIUM: connection/ssl: also fix the ssl_sock_io_cb() regarding idle list
    - DOC: http: document 413 response code
    - MINOR: limits: display the computed maxconn using ha_notice()
    - BUG/MEDIUM: applet: Fix conditions to detect spinning loop with the new API
    - BUG/MEDIUM: cli: State the cli have no more data to deliver if it yields
    - MINOR: h3: adjust sedesc update for known input payload len
    - BUG/MINOR: mux-quic: fix sedesc leak on BE side
    - OPTIM: mux-quic: delay FE sedesc alloc to stream creation
    - BUG/MEDIUM: quic-be: quic_conn_closed buffer overflow
    - BUG/MINOR: mux-quic: check access on qcs stream-endpoint
    - BUG/MINOR: acme: handle multiple auth with the same name
    - BUG/MINOR: acme: prevent creating map entries with dns-01

3 weeks agoBUG/MINOR: acme: prevent creating map entries with dns-01
William Lallemand [Fri, 21 Nov 2025 11:25:42 +0000 (12:25 +0100)] 
BUG/MINOR: acme: prevent creating map entries with dns-01

We don't need map entries with dns-01.

The patch must be backported to 3.2.

3 weeks agoBUG/MINOR: acme: handle multiple auth with the same name
William Lallemand [Fri, 21 Nov 2025 11:10:21 +0000 (12:10 +0100)] 
BUG/MINOR: acme: handle multiple auth with the same name

In case of the dns-01 challenge, it is possible to have a domain
"example.com" and "*.example.com" in the same request. This will create
2 different auth objects, which need 2 different challenges.

However the associated domain is "example.com" for both auth objects.

When doing a "challenge_ready", the algorithm will break at the first
domain found. But since you can have multiple time the same domain in
this case, breaking at the first one prevent to have all auth objects in
a ready state.

This patch just remove the break so we can loop on every auth objects.

Must be backported to 3.2.

3 weeks agoBUG/MINOR: mux-quic: check access on qcs stream-endpoint
Amaury Denoyelle [Fri, 21 Nov 2025 10:06:38 +0000 (11:06 +0100)] 
BUG/MINOR: mux-quic: check access on qcs stream-endpoint

Since the following commit, allocation of stream-endpoint has been
delayed. The objective is to allocate it only for QCS attached to an
upper stream object.

  commit e6064c561684d9b079e3b5725d38dc3b5c1b5cd5
  OPTIM: mux-quic: delay FE sedesc alloc to stream creation

However, some MUX functions are unsafe as qcs->sd is dereferenced
without any check on it which will result in a crash. Fix this by
testing that qcs->sd is allocated before using it.

This does not need to be backported, unless the above patch is.

3 weeks agoBUG/MEDIUM: quic-be: quic_conn_closed buffer overflow
Frederic Lecaille [Fri, 21 Nov 2025 08:52:41 +0000 (09:52 +0100)] 
BUG/MEDIUM: quic-be: quic_conn_closed buffer overflow

This bug impacts only the backends.

Recent commits have modified quic_rx_pkt_parse() for the QUIC backend to handle the
retry token, and version negotiation. This function is called for the quic_conn
even when is closing state (so for the quic_conn_closed struct). The quic_conn
struct and quic_conn_closed struct share some members thank to the leading
QUIC_CONN_COMMON struct. The recent modification impacts some members which do not
exist for the quic_connn_closed struct, leading to buffer overflows if modified.

For the backends only this patch:
  1- silently drops the Retry packet (received/parsed only by backends)
  2- silently drops the Initial packets received in closing state

This is safe for the Initial packets because in closing state the datagrams
are entirely skipped thanks to qc_rx_check_closing() in quic_dgram_parse().

No backport needed because the backend support arrived with the current dev.

3 weeks agoOPTIM: mux-quic: delay FE sedesc alloc to stream creation
Amaury Denoyelle [Thu, 20 Nov 2025 17:15:21 +0000 (18:15 +0100)] 
OPTIM: mux-quic: delay FE sedesc alloc to stream creation

On frontend side, a stream-endpoint is allocated on every qcs_new()
invokation. However, this is only used for bidirectional request
streams.

This patch delays stream-endpoint allocation to qcs_attach_sc(), just
prior the instantiation of the upper stream object. This does not bring
any behavior change but is a nice optimization.

3 weeks agoBUG/MINOR: mux-quic: fix sedesc leak on BE side
Amaury Denoyelle [Thu, 20 Nov 2025 17:14:55 +0000 (18:14 +0100)] 
BUG/MINOR: mux-quic: fix sedesc leak on BE side

On backend side, streams are instantiated prior to their QCS MUX
counterpart. Thus, QCS can reuse the stream-endpoint already allocated
with the streams, either on qmux_init() or attach operation.

However, a stream-endpoint is also always allocated in every qcs_new()
invokation. For backend QCS, it is thus overwritten on
qmux_init()/attach operation. This causes a memleak.

Fix this by restricting allocation of stream-endpoint only for frontend
connection.

This does not need to be backported.

3 weeks agoMINOR: h3: adjust sedesc update for known input payload len
Amaury Denoyelle [Thu, 20 Nov 2025 17:12:39 +0000 (18:12 +0100)] 
MINOR: h3: adjust sedesc update for known input payload len

3 weeks agoBUG/MEDIUM: cli: State the cli have no more data to deliver if it yields
Christopher Faulet [Fri, 21 Nov 2025 08:47:01 +0000 (09:47 +0100)] 
BUG/MEDIUM: cli: State the cli have no more data to deliver if it yields

A regression was introduced in the commit 2d7e3ddd4 ("BUG/MEDIUM: cli: do
not return ACKs one char at a time"). When the CLI is processing a command
line, we no longer send response immediately. It is especially useful for
clients sending a bunch of commands with very short response.

However, in that state, the CLI applet must state it has no more data to
deliver. Otherwise it will be woken up again and again because data are
found in its output buffer with no blocking conditions. In worst cases, if
the command rate is really high, this can trigger the watchdog.

This patch must be backported where the patch above is, so probably as far
as 3.0.

3 weeks agoBUG/MEDIUM: applet: Fix conditions to detect spinning loop with the new API
Christopher Faulet [Fri, 21 Nov 2025 08:41:03 +0000 (09:41 +0100)] 
BUG/MEDIUM: applet: Fix conditions to detect spinning loop with the new API

There was a mixup between read/send events and ability for an applet to
receive and send. The fix seems obvious by reading it. The call-rate must be
incremented when nothing was received from the applet while it was allowed
and nothing was sent to the applet while it was allowed.

This patch must be backported as far as 3.0.