mbedtls/ChangeLog.d
Joachim Bauernberger e462a2ea4e Validate the TLS 1.3 server key_share extension
The TLS 1.3 server accepted a malformed key_share extension in the
ClientHello and then closed the connection without sending an alert:

- a zero-length key_exchange was accepted;
- a key_exchange whose length did not match its group was only caught
  later, by the key agreement, which returned without pending an alert;
- data trailing the client_shares list was ignored.

Reject these in ssl_tls13_parse_key_shares_ext() and in the shared
key-exchange reader mbedtls_ssl_tls13_read_public_xxdhe_share():

- a zero-length key_exchange and trailing data after client_shares are
  rejected with a decode_error alert;
- a key_exchange whose length does not match the group is rejected with
  an illegal_parameter alert, which is what OpenSSL does.

The shared reader is also used by the client, so it now checks that a
ServerHello key_share is consumed exactly.

Expose ssl_tls13_parse_key_shares_ext() with MBEDTLS_STATIC_TESTABLE and
add unit tests that feed crafted key_share extensions to the server
parser.

Fixes #10887.
Fixes #10737.

Signed-off-by: Joachim Bauernberger <joachim.bauernberger@protonmail.com>
2026-10-25 20:18:11 +01:00
..
00README.md scripts: fix paths for files moved to framework 2025-01-08 09:59:18 +01:00
cert-write-der-windows.txt Add changelog for DER certificate output fix 2026-10-06 12:34:53 +05:30
cmake-config.txt CMake: separate base config 2026-08-14 15:08:42 +01:00
fix-ENABLE_PROGRAMS-bug.txt Update Changelog 2026-06-30 15:36:19 +01:00
numeric-oid-overflow.txt Reject overflowing numeric OID components 2026-08-10 02:38:16 +03:00
serialized-data-load-hardening.txt Reject out-of-bounds session ID length in ssl_tls12_session_load 2026-07-09 13:07:44 +05:30
ssl-context-load-alpn-bounds.txt Reject out-of-bounds ALPN length in ssl_context_load 2026-09-22 17:23:31 +05:30
tls12-handshake-length-read-bounds.txt rework handshake length checks per review 2026-08-07 15:48:03 +05:30
tls13-key-share-validation.txt Validate the TLS 1.3 server key_share extension 2026-10-25 20:18:11 +01:00
x509-basic-constraints-integer-first.txt x509: Accept basicConstraints with omitted cA 2026-10-16 13:53:40 +03:00
x509-empty-authority-key-id.txt Add ChangeLog entry for empty AuthorityKeyIdentifier 2026-09-26 10:27:11 +02:00