Don't change the state of the ETM flags until CCS processing
authorMatt Caswell <matt@openssl.org>
Fri, 3 Feb 2017 14:06:20 +0000 (14:06 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 16 Feb 2017 09:35:56 +0000 (09:35 +0000)
In 1.1.0 changing the ciphersuite during a renegotiation can result in
a crash leading to a DoS attack. In master this does not occur with TLS
(instead you get an internal error, which is still wrong but not a security
issue) - but the problem still exists in the DTLS code.

The problem is caused by changing the flag indicating whether to use ETM
or not immediately on negotiation of ETM, rather than at CCS. Therefore,
during a renegotiation, if the ETM state is changing (usually due to a
change of ciphersuite), then an error/crash will occur.

Due to the fact that there are separate CCS messages for read and write
we actually now need two flags to determine whether to use ETM or not.

CVE-2017-3733

Reviewed-by: Richard Levitte <levitte@openssl.org>

No differences found