summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2022-09-17 17:14:06 +0000
committerjsing <>2022-09-17 17:14:06 +0000
commitd0670f66492b039f0e82fff119d3e75395bf2ddb (patch)
tree3b2719490fff13b2c9a162765cb36e12b1f794be
parenta59763ac6d9278c585e3fe8acb0e5338e5b12762 (diff)
downloadopenbsd-d0670f66492b039f0e82fff119d3e75395bf2ddb.tar.gz
openbsd-d0670f66492b039f0e82fff119d3e75395bf2ddb.tar.bz2
openbsd-d0670f66492b039f0e82fff119d3e75395bf2ddb.zip
Allow TLSv1.3 clients to send CCS without middlebox compatibility mode.
While RFC 8446 is clear about what legacy session identifiers can be sent by a TLSv1.3 client and how middlebox compatibility mode is requested, it is delightfully vague about the circumstances under which a client is permitted to send CCS messages. While it does not make sense for a client to send CCS messages when they are not requesting middlebox compatibility mode, it is not strictly forbidden by the RFC and at least one (unknown) TLSv1.3 stack has been observed to do this in the wild. Revert part of the previous change and allow clients to send CCS messages, even if they are not requesting middlebox compatibility mode. Found the hard way by florian@ ok tb@
-rw-r--r--src/lib/libssl/tls13_server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index b1612a86e5..82350702dc 100644
--- a/src/lib/libssl/tls13_server.c
+++ b/src/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_server.c,v 1.102 2022/09/11 14:39:44 jsing Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.103 2022/09/17 17:14:06 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -318,9 +318,7 @@ tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs)
318 if (ctx->hs->key_share != NULL) 318 if (ctx->hs->key_share != NULL)
319 ctx->handshake_stage.hs_type |= NEGOTIATED | WITHOUT_HRR; 319 ctx->handshake_stage.hs_type |= NEGOTIATED | WITHOUT_HRR;
320 320
321 /* Only allow CCS if client requested middlebox compatibility mode. */ 321 tls13_record_layer_allow_ccs(ctx->rl, 1);
322 if (ctx->hs->tls13.legacy_session_id_len > 0)
323 tls13_record_layer_allow_ccs(ctx->rl, 1);
324 322
325 return 1; 323 return 1;
326 324