All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: <kernel-tls-handshake@lists.linux.dev>
Subject: [PATCH 8/8] tlshd: Skip the session ticket after a failed QUIC handshake
Date: Sat,  5 Dec 2026 13:27:43 -0500	[thread overview]
Message-ID: <20261205182743.79220-9-cel@kernel.org> (raw)
In-Reply-To: <20261205182743.79220-1-cel@kernel.org>

The handshake loop in tlshd_quic_start_handshake() exits on completion
and also when conn->errcode has been set. After a failure, a client
configured to receive a session ticket still waits for one, which
delays the report of the failure. An error while fetching or
processing a ticket also replaces the original value of
conn->errcode.

Return from tlshd_quic_recv_session_ticket() at once when the
handshake has failed.

Fixes: 22e0f96d059f ("tlshd: receive new session ticket msg after completing quic handshake")
Signed-off-by: Chuck Lever <cel@kernel.org>
---
 src/tlshd/quic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tlshd/quic.c b/src/tlshd/quic.c
index 801a7d777a94..454c68855d2e 100644
--- a/src/tlshd/quic.c
+++ b/src/tlshd/quic.c
@@ -677,7 +677,7 @@ static void tlshd_quic_recv_session_ticket(struct tlshd_quic_conn *conn)
 	unsigned int len;
 	size_t size;
 
-	if (conn->is_serv || !conn->recv_ticket)
+	if (conn->errcode || conn->is_serv || !conn->recv_ticket)
 		return;
 
 	for (i = 0; i < 10 * conn->recv_ticket; i++) { /* wait and try for conn->recv_ticket secs */
-- 
2.56.0


      parent reply	other threads:[~2026-12-05 18:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 18:27 [PATCH 0/8] More security-related fixes Chuck Lever
2026-12-05 18:27 ` [PATCH 1/8] tlshd: Unlink keyrings that a reload removes from the configuration Chuck Lever
2026-12-05 18:27 ` [PATCH 2/8] tlshd: Escape client PSK identities before logging them Chuck Lever
2026-12-05 18:27 ` [PATCH 3/8] tlshd: Escape the client certificate description before logging it Chuck Lever
2026-12-05 18:27 ` [PATCH 4/8] tlshd: Limit the number of concurrent handshake processes Chuck Lever
2026-12-05 18:27 ` [PATCH 5/8] tlshd: Enforce the QUIC handshake timeout in the event loop Chuck Lever
2026-12-05 18:27 ` [PATCH 6/8] tlshd: Strip whitespace from keyring names Chuck Lever
2026-12-05 18:27 ` [PATCH 7/8] tlshd: Escape certificate names before logging tag filter results Chuck Lever
2026-12-05 18:27 ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261205182743.79220-9-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.