提交 af4c6e34 编写于 作者: E Erik Auerswald 提交者: Rich Salz

RT3301: Discard too-long heartbeat requests

Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 98ecf60b
......@@ -1363,6 +1363,9 @@ dtls1_process_heartbeat(SSL *s)
/* Read type and payload length first */
if (1 + 2 + 16 > s->s3->rrec.length)
return 0; /* silently discard */
if (s->s3->rrec.length > SSL3_RT_MAX_PLAIN_LENGTH)
return 0; /* silently discard per RFC 6520 sec. 4 */
hbtype = *p++;
n2s(p, payload);
if (1 + 2 + payload + 16 > s->s3->rrec.length)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册