mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-28 18:07:34 +08:00
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> |
||
|---|---|---|
| .. | ||
| .jenkins | ||
| configs | ||
| git-scripts | ||
| include | ||
| opt-testcases | ||
| scripts | ||
| src | ||
| suites | ||
| .gitignore | ||
| CMakeLists.txt | ||
| compat-in-docker.sh | ||
| compat.sh | ||
| context-info.sh | ||
| Descriptions.txt | ||
| make-in-docker.sh | ||
| Makefile | ||
| ssl-opt.sh | ||