]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
7 hours agoBUG/MEDIUM: quic: Don't try to use hystart if not implemented master
Olivier Houchard [Sun, 14 Dec 2025 15:10:21 +0000 (16:10 +0100)] 
BUG/MEDIUM: quic: Don't try to use hystart if not implemented

Not every CC algos implement hystart, so only call the method if it is
actually there. Failure to do so will cause crashes if hystart is on,
and the algo doesn't implement it.

This should fix github issue #3218

This should be backported up to 3.0.

2 days agoBUG/MEDIUM: stconn: Don't report abort from SC if read0 was already received
Christopher Faulet [Thu, 11 Dec 2025 16:11:36 +0000 (17:11 +0100)] 
BUG/MEDIUM: stconn: Don't report abort from SC if read0 was already received

SC_FL_ABRT_DONE flag should never be set when SC_FL_EOS was already
set. These both flags were introduced to replace the old CF_SHUTR and to
have a flag for shuts driven by the stream and a flag for the read0 received
by the mux. So both flags must not be seen at same time on a SC. It is
espeically important because some processing are performed when these flags
are set. And wrong decisions may be made.

This patch must be backproted as far as 2.8.

2 days agoBUG/MEDIUM: http-ana: Properly detect client abort when forwarding response (v2)
Christopher Faulet [Thu, 11 Dec 2025 14:21:01 +0000 (15:21 +0100)] 
BUG/MEDIUM: http-ana: Properly detect client abort when forwarding response (v2)

The first attempt to fix this issue (c672b2a29 "BUG/MINOR: http-ana:
Properly detect client abort when forwarding the response") was not fully
correct and could be responsible to false report of client abort during the
response forwarding. I guess it is possible to truncate the response.

Instead, we must also take care that the client closed on its side, by
checking SC_FL_EOS flag on the front SC. Indeed, if the client has aborted,
this flag should be set.

This patch should be backported as far as 2.8.

3 days agoBUG/MEDIUM: mworker/listener: ambiguous use of RX_F_INHERITED with shards
William Lallemand [Thu, 11 Dec 2025 15:53:18 +0000 (16:53 +0100)] 
BUG/MEDIUM: mworker/listener: ambiguous use of RX_F_INHERITED with shards

The RX_F_INHERITED flag was ambiguous, as it was used to mark both
listeners inherited from the parent process and listeners duplicated
from another local receiver. This could lead to incorrect behavior
concerning socket unbinding and suspension.

This commit refactors the handling of inherited listeners by splitting
the RX_F_INHERITED flag into two more specific flags:

- RX_F_INHERITED_FD: Indicates a listener inherited from the parent
  process via its file descriptor. These listeners should not be unbound
  by the master.

- RX_F_INHERITED_SOCK: Indicates a listener that shares a socket with
  another one, either by being inherited from the parent or by being
  duplicated from another local listener. These listeners should not be
  suspended or resumed individually.

Previously, the sharding code was unconditionally using RX_F_INHERITED
when duplicating a file descriptor. In HAProxy versions prior to 3.1,
this led to a file descriptor leak for duplicated unix stats sockets in
the master process. This would eventually cause the master to crash with
a BUG_ON in fd_insert() once the file descriptor limit was reached.

This must be backported as far as 3.0. Branches earlier than 3.0 are
affected but would need a different patch as the logic is different.

4 days ago[RELEASE] Released version 3.4-dev1 v3.4-dev1
Willy Tarreau [Wed, 10 Dec 2025 15:52:30 +0000 (16:52 +0100)] 
[RELEASE] Released version 3.4-dev1

Released version 3.4-dev1 with the following main changes :
    - BUG/MINOR: jwt: Missing "case" in switch statement
    - DOC: configuration: ECH support details
    - Revert "MINOR: quic: use dynamic cc_algo on bind_conf"
    - MINOR: quic: define quic_cc_algo as const
    - MINOR: quic: extract cc-algo parsing in a dedicated function
    - MINOR: quic: implement cc-algo server keyword
    - BUG/MINOR: quic-be: Missing keywords array NULL termination
    - REGTESTS: ssl enable tls12_reuse.vtc for AWS-LC
    - REGTESTS: ssl: split tls*_reuse in stateless and stateful resume tests
    - BUG/MEDIUM: connection: fix "bc_settings_streams_limit" typo
    - BUG/MEDIUM: config: ignore empty args in skipped blocks
    - DOC: config: mention clearer that the cache's total-max-size is mandatory
    - DOC: config: reorder the cache section's keywords
    - BUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces
    - BUG/MINOR: quic-be: handshake errors without connection stream closure
    - MINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()
    - REGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory
    - REGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC
    - REGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC
    - REGTESTS: quic: issuers_chain_path.vtc supported by QUIC
    - REGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC
    - REGTESTS: quic: ocsp_auto_update.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC
    - MINOR: quic: avoid code duplication in TLS alert callback
    - BUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send
    - REGTESTS: quic: set_ssl_cafile.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_cert.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC
    - REGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC
    - REGTESTS: quic: ssl_client_auth.vtc supported by QUIC
    - REGTESTS: quic: ssl_client_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_default_server.vtc supported by QUIC
    - REGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC
    - REGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_server_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC
    - REGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC
    - REGTESTS: quic: ssl_curve_name.vtc supported by QUIC
    - REGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC
    - REGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)
    - BUG/MINOR: quic: do not set first the default QUIC curves
    - REGTESTS: quic/ssl: Add ssl_curves_selection.vtc
    - BUG/MINOR: ssl: Don't allow to set NULL sni
    - MEDIUM: quic: Add connection as argument when qc_new_conn() is called
    - MINOR: ssl: Add a function to hash SNIs
    - MINOR: ssl: Store hash of the SNI for cached TLS sessions
    - MINOR: ssl: Compare hashes instead of SNIs when a session is cached
    - MINOR: connection/ssl: Store the SNI hash value in the connection itself
    - MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
    - BUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs
    - MEDIUM: ssl/server: No longer store the SNI of cached TLS sessions
    - BUG/MINOR: log: Dump good %B and %U values in logs
    - BUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode
    - DOC: config: Fix description of the spop mode
    - DOC: config: Improve spop mode documentation
    - MINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version
    - REGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC
    - BUG/MEDIUM: h3: do not access QCS <sd> if not allocated
    - CLEANUP: mworker/cli: remove useless variable
    - BUG/MINOR: mworker/cli: 'show proc' is limited by buffer size
    - BUG/MEDIUM: ssl: Always check the ALPN after handshake
    - MINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag
    - BUG/MEDIUM: ssl: Don't store the ALPN for check connections
    - BUG/MEDIUM: ssl: Don't resume session for check connections
    - CLEANUP: improvements to the alignment macros
    - CLEANUP: use the automatic alignment feature
    - CLEANUP: more conversions and cleanups for alignment
    - BUG/MEDIUM: h3: fix access to QCS <sd> definitely
    - MINOR: h2/trace: emit a trace of the received RST_STREAM type

4 days agoMINOR: h2/trace: emit a trace of the received RST_STREAM type
Willy Tarreau [Wed, 10 Dec 2025 14:56:34 +0000 (15:56 +0100)] 
MINOR: h2/trace: emit a trace of the received RST_STREAM type

Right now we don't get any state trace when receiving an RST_STREAM, and
this is not convenient because RST_STREAM(0) is not visible at all, except
in developer level because the function is entered and left.

Let's extract the RST code first and always log it using TRACE_PRINTF()
(along with h2c/h2s) so that it's possible to detect certain codes being
used.

4 days agoBUG/MEDIUM: h3: fix access to QCS <sd> definitely quic-interop
Amaury Denoyelle [Wed, 10 Dec 2025 10:57:34 +0000 (11:57 +0100)] 
BUG/MEDIUM: h3: fix access to QCS <sd> definitely

The previous patch tried to fix access to QCS <sd> member, as the latter
is not always allocated anymore on the frontend side.

  a15f0461a016a664427f5aaad2227adcc622c882
  BUG/MEDIUM: h3: do not access QCS <sd> if not allocated

In particular, access was prevented after HEADERS parsing in case
h3_req_headers_to_htx() returned an error, which indicates that the
stream-endpoint allocation was not performed. However, this still is not
enough when QCS instance is already closed at this step. Indeed, in this
case, h3_req_headers_to_htx() returns OK but stream-endpoint allocation
is skipped as an optimization as no data exchange will be performed.

To definitely fix this kind of problems, add checks on qcs <sd> member
before accessing it in H3 layer. This method is the safest one to ensure
there is no NULL dereferencement.

This should fix github issue #3211.

This must be backported along the above mentionned patch.

5 days agoCLEANUP: more conversions and cleanups for alignment
Maxime Henrion [Tue, 9 Dec 2025 16:26:02 +0000 (11:26 -0500)] 
CLEANUP: more conversions and cleanups for alignment

- Convert additional cases to use the automatic alignment feature for
  the THREAD_ALIGN(ED) macros. This includes some cases that are less
  obviously correct where it seems we wanted to align only in the
  USE_THREAD case but were not using the thread specific macros.
- Also move some alignment requirements to the structure definition
  instead of having it on variable declaration.

5 days agoCLEANUP: use the automatic alignment feature
Maxime Henrion [Tue, 9 Dec 2025 16:08:58 +0000 (11:08 -0500)] 
CLEANUP: use the automatic alignment feature

- Use the automatic alignment feature instead of hardcoding 64 all over
  the code.
- This also converts a few bare __attribute__((aligned(X))) to using the
  ALIGNED macro.

5 days agoCLEANUP: improvements to the alignment macros
Maxime Henrion [Tue, 9 Dec 2025 15:51:33 +0000 (10:51 -0500)] 
CLEANUP: improvements to the alignment macros

- It is now possible to use the THREAD_ALIGN and THREAD_ALIGNED macros
  without a parameter. In this case, we automatically align on the cache
  line size.
- The cache line size is set to 64 by default to match the current code,
  but it can be overridden on the command line.
- This required moving the DEFVAL/DEFNULL/DEFZERO macros to compiler.h
  instead of tools-t.h, to avoid namespace pollution if we included
  tools-t.h from compiler.h.

5 days agoBUG/MEDIUM: ssl: Don't resume session for check connections
Olivier Houchard [Tue, 9 Dec 2025 15:25:40 +0000 (16:25 +0100)] 
BUG/MEDIUM: ssl: Don't resume session for check connections

Don't attempt to use stored sessions when creating new check
connections, as the check SSL parameters might be different from the
server's ones.
This has not been proven to be a problem yet, but it doesn't mean it
can't be, and this should be backported up to 2.8 along with
dcce9369129f6ca9b8eed6b451c0e20c226af2e3 if it is.

5 days agoBUG/MEDIUM: ssl: Don't store the ALPN for check connections
Olivier Houchard [Tue, 9 Dec 2025 15:17:08 +0000 (16:17 +0100)] 
BUG/MEDIUM: ssl: Don't store the ALPN for check connections

When establishing check connections, do not store the negociated ALPN
into the server's path_param if the connection is a check connection, as
it may use different SSL parameters than the regular connections. To do
so, only store them if the CO_FL_SSL_NO_CACHED_INFO is not set.
Otherwise, the check ALPN may be stored, and the wrong mux can be used
for regular connections, which will end up generating 502s.

This should fix Github issue #3207

This should be backported to 3.3.

5 days agoMINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag
Olivier Houchard [Tue, 9 Dec 2025 15:10:24 +0000 (16:10 +0100)] 
MINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag

Add a new flag to connections, CO_FL_SSL_NO_CACHED_INFO, and set it for
checks.
It lets the ssl layer know that he should not use cached informations,
such as the ALPN as stored in the server, or cached sessions.
This wlil be used for checks, as checks may target different servers, or
used a different SSL configuration, so we can't assume the stored
informations are correct.

This should be backported to 3.3, and may be backported up to 2.8 if the
attempts to do session resume by checks is proven to be a problem.

5 days agoBUG/MEDIUM: ssl: Always check the ALPN after handshake
Olivier Houchard [Tue, 9 Dec 2025 15:02:00 +0000 (16:02 +0100)] 
BUG/MEDIUM: ssl: Always check the ALPN after handshake

Move the code that is responsible for checking the ALPN, and updating
the one stored in the server's path_param, from after we created the
mux, to after we did an handshake. Once we did it once, the mux will not
be created by the ssl code anymore, as when we know which mux to use
thanks to the ALPN, it will be done earlier in connect_server(), so in
the unlikely event it changes, we would not detect it anymore, and we'd
keep on creating the wrong mux.
This can be reproduced by doing a first request, and then changing the
ALPN of the server without haproxy noticing (ie without haproxy noticing
that the server went down).

This should be backported to 3.3.

5 days agoBUG/MINOR: mworker/cli: 'show proc' is limited by buffer size
William Lallemand [Mon, 8 Dec 2025 17:05:36 +0000 (18:05 +0100)] 
BUG/MINOR: mworker/cli: 'show proc' is limited by buffer size

In ticket #3204, it was reported that "show proc" is not able to display
more than 202 processes. Indeed the bufsize is 16k by default in the
master, and can't be changed anymore since 3.1.

This patch allows the 'show proc' to start again to dump when the buffer
is full, based on the timestamp of the last PID it attempted to dump.
Using pointers or count the number of processes might not be a good idea
since the list can change between calls.

Could be backported in all stable branche.

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.