Tolerate DTLS alerts with an incorrect version number
authorMatt Caswell <matt@openssl.org>
Fri, 5 Jan 2018 10:12:29 +0000 (10:12 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 9 Jan 2018 22:14:59 +0000 (22:14 +0000)
commitda9ed72576a6b21a44df5eb913727838e99ff7c8
tree0937751a97e6ce45e958ec7a308966d78a894e81
parenta353f94ae693b464bb8ea1b0eb87729142fe6f56
Tolerate DTLS alerts with an incorrect version number

In the case of a protocol version alert being sent by a peer the record
version number may not be what we are expecting. In DTLS records with an
unexpected version number are silently discarded. This probably isn't
appropriate for alerts, so we tolerate a mismatch in the minor version
number.

This resolves an issue reported on openssl-users where an OpenSSL server
chose DTLS1.0 but the client was DTLS1.2 only and sent a protocol_version
alert with a 1.2 record number. This was silently ignored by the server.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5019)
ssl/d1_pkt.c