summaryrefslogtreecommitdiffstats
path: root/ssl/d1_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-05-10 16:03:36 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-05-10 16:03:36 +0000
commite7c8483891eb3e0a644cda87ccbff5184072aeb6 (patch)
tree15a4bb094c686a27c6f3f8bba15724c8da97915f /ssl/d1_enc.c
parent712d523484c3dbe384fb6699ea228b8aef7723e9 (diff)
Sanity check record length before skipping explicit IV in TLS 1.2, 1.1 and
DTLS to fix DoS attack. Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic fuzzing as a service testing platform. (CVE-2012-2333)
Diffstat (limited to 'ssl/d1_enc.c')
-rw-r--r--ssl/d1_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/d1_enc.c b/ssl/d1_enc.c
index becbab91c2..07a5e97ce5 100644
--- a/ssl/d1_enc.c
+++ b/ssl/d1_enc.c
@@ -260,7 +260,7 @@ int dtls1_enc(SSL *s, int send)
}
/* TLS 1.0 does not bound the number of padding bytes by the block size.
* All of them must have value 'padding_length'. */
- if (i > (int)rec->length)
+ if (i + bs > (int)rec->length)
{
/* Incorrect padding. SSLerr() and ssl3_alert are done
* by caller: we don't want to reveal whether this is