Fix a hang with SSL_peek()
authorMatt Caswell <matt@openssl.org>
Sat, 10 Sep 2016 20:24:40 +0000 (21:24 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 22 Sep 2016 08:28:07 +0000 (09:28 +0100)
commit63658103d4441924f8dbfc517b99bb54758a98b9
treef20ce1722595ea6e7fae3a31b338564b1ba52096
parent6d32c2ae28952b5c1d7a24968e488532fcadc51a
Fix a hang with SSL_peek()

If while calling SSL_peek() we read an empty record then we go into an
infinite loop, continually trying to read data from the empty record and
never making any progress. This could be exploited by a malicious peer in
a Denial Of Service attack.

CVE-2016-6305

GitHub Issue #1563

Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/record/rec_layer_s3.c