From: Michael Brown Date: Wed, 8 Jul 2026 11:02:51 +0000 (+0100) Subject: [tls] Poison initial resumption master secret X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a96034bc42855801f401ce2442e33ba73d87983;p=thirdparty%2Fipxe.git [tls] Poison initial resumption master secret There should be no circumstance that leads to a session being resumed without having a valid session resumption secret that was stored by a successfully established previous connection. As an additional layer of defence in depth, poison the initial session resumption master secret so that a predictable all-zero secret can never be used accidentally in future. Signed-off-by: Michael Brown --- diff --git a/src/net/tls.c b/src/net/tls.c index 9c2f4cdf6..907f4071c 100644 --- a/src/net/tls.c +++ b/src/net/tls.c @@ -4268,6 +4268,11 @@ static int tls_session ( struct tls_connection *tls, const char *name ) { INIT_LIST_HEAD ( &session->conn ); list_add ( &session->list, &tls_sessions ); + /* Poison resumption master secret */ + tls_ephemeral_label ( tls, "res poison", + session->resumption_master_secret, + sizeof ( session->resumption_master_secret ) ); + /* Record session */ tls->session = session;