mirror of
https://github.com/ipxe/ipxe
synced 2026-10-07 15:05:42 +03:00
[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 <mcb30@ipxe.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user