OpenSSL: Detect and prevent TLS heartbeat attack
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 9 Apr 2014 10:02:53 +0000 (13:02 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 9 Apr 2014 11:58:48 +0000 (14:58 +0300)
commitbb52293e712e392d11bdc2bafd00208968cee748
treed934f04198ebc352c2a1199435df000f16eb2d88
parentd8e0013e411f74f5e0ea106216045b543824c299
OpenSSL: Detect and prevent TLS heartbeat attack

Some OpenSSL versions have vulnerability in TLS heartbeat request
processing. Check the processed message to determine if the attack has
been used and if so, do not send the response to the peer. This does not
prevent the buffer read overflow within OpenSSL, but this prevents the
attacker from receiving the information.

This change is an additional layer of protection if some yet to be
identified paths were to expose this OpenSSL vulnerability. However, the
way OpenSSL is used for EAP-TLS/TTLS/PEAP/FAST in hostapd/wpa_supplicant
was already rejecting the messages before the response goes out and as
such, this additional change is unlikely to be needed to avoid the
issue.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/crypto/tls_openssl.c