diff options
author | Erik Auerswald <auerswal@unix-ag.uni-kl.de> | 2014-08-26 22:50:34 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2014-09-08 11:23:10 -0400 |
commit | b537ea9ce43d1a920b60ec30f2b5cdb9bbb05e29 (patch) | |
tree | 01df770a779292ed7afbab658a9016ba42fa6405 /ssl/d1_both.c | |
parent | 13ce52be1b9b0d5b409d079b846b748c069b2b69 (diff) |
RT3301: Discard too-long heartbeat requests
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit af4c6e348e4bad6303e7d214cdcf2536487aabe4)
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 89cdca8064..2e4250fcfe 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -1492,6 +1492,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) |