Tolerate a bad record version in TLSv1.3 plaintext records
authorMatt Caswell <matt@openssl.org>
Wed, 24 Aug 2022 15:02:23 +0000 (16:02 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 29 Aug 2022 10:21:27 +0000 (12:21 +0200)
commit2093428834151ea4788aa773b5aa2d35e0bbc90a
tree2ea122bc6e528774ba869645d3a440485d373d32
parent6347b86778a392c955b60b1ce107951d3552aec2
Tolerate a bad record version in TLSv1.3 plaintext records

When a server responds to a second TLSv1.3 ClientHello it is required to
set the legacy_record_version to 0x0303 (TLSv1.2). The client is required
to ignore that field even if it is wrong. The recent changes to the read
record layer in PR #18132 made the record layer stricter and it was
checking that the legacy_record_version was the correct value. This
caused connection failures when talking to buggy servers that set the
wrong legacy_record_version value.

We make us more tolerant again.

Fixes #19051

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19058)
ssl/record/methods/tlsany_meth.c