Files
Mounir IDRASSI 3e4f7e7720 Reject unknown TLS 1.3 ServerHello extensions
TLS 1.3 does not permit clients to ignore unknown extensions in ServerHello
or HelloRetryRequest. Add a validation pass for these messages so fully
unknown extension types fail early with unsupported_extension.

Keep the existing ignore behavior for other extension contexts and leave
TLS 1.2 ServerHello processing unchanged. Add TLSProxy coverage for the
TLS 1.3 ServerHello case.

Correct the unknown-extension path in tls_collect_extensions(). Collection
still runs before the new TLS 1.3 validation, and verify_extension()
returns success with thisex == NULL for fully unknown extension types.
The previous idx calculation used invalid pointer arithmetic on NULL in
that path. Map unknown extensions explicitly outside the built-in extension
range instead, preserving the existing ignore semantics while avoiding
undefined behavior.

Update the truncated HRR ECH corruption vector to keep testing malformed
ECH length after the new unknown-extension validation. The old 0xdddd bytes
were only padding to preserve the replacement length, but they now trigger
the unknown-extension check before the ECH parser. Use a known HRR cookie
extension as padding so the test still reaches the intended
SSL_R_LENGTH_MISMATCH path.

Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Daniel Kubec <kubec@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Thu Jul 23 15:55:09 2026
(Merged from https://github.com/openssl/openssl/pull/31086)
2026-07-23 17:55:07 +02:00
..
2026-05-26 16:28:30 +02:00
2022-05-03 13:34:51 +01:00
2026-03-10 14:37:52 +00:00
2019-04-19 09:31:54 +01:00
2025-09-02 13:05:45 +00:00
2021-09-02 12:55:39 +10:00
2025-12-04 07:32:18 -05:00
2020-04-23 13:55:52 +01:00
2025-09-02 13:05:45 +00:00
2026-02-17 09:09:01 -05:00
2019-09-19 09:27:38 -04:00
2025-03-12 13:35:59 +00:00
2024-04-09 13:43:26 +02:00
2021-04-08 13:04:41 +01:00
2026-03-10 14:37:52 +00:00
2022-12-08 07:01:33 +01:00
2025-12-04 07:32:18 -05:00