mbedtls/ChangeLog.d
v1rtu3x 83d132b47d tls13: server: reject zero-length psk_key_exchange_modes
RFC 8446 section 4.2.9 defines the ke_modes vector of the psk_key_exchange_modes extension as ke_modes<1..255>, so a zero-length vector is malformed.

ssl_tls13_parse_key_exchange_modes_ext() accepted such a vector, recording an empty set of PSK key exchange modes. This could lead to issuing session tickets that can never be used for resumption.

Reject the ClientHello with a decode_error alert, per RFC 8446 section 6: a vector shorter than its declared minimum violates the formal syntax of the extension (decode_error); it is not merely inconsistent with other fields (illegal_parameter).

Add a regression test that patches a ClientHello in flight to set the ke_modes vector length to zero, and checks that the server aborts with MBEDTLS_ERR_SSL_DECODE_ERROR and that the client receives the decode_error alert on the wire.

Fixes #10467

Signed-off-by: v1rtu3x <149050962+v1rtu3x@users.noreply.github.com>
2026-08-31 11:41:39 +03:00
..
00README.md scripts: fix paths for files moved to framework 2025-01-08 09:59:18 +01: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
tls13-empty-psk-kex-modes.txt tls13: server: reject zero-length psk_key_exchange_modes 2026-08-31 11:41:39 +03:00