summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-05-10 14:33:11 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-05-10 14:33:11 +0000
commit36dd4cba3dfa87aebd59d10c844fdda3a31b89db (patch)
tree2d1edd5b93a10cc5241b95ac4b1a5845449d299d /ssl
parent3978429ad5a07907eae59ff9d20fba117208ef23 (diff)
Sanity check record length before skipping explicit IV in 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')
-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 bb96c8a20c..baa75f9186 100644
--- a/ssl/d1_enc.c
+++ b/ssl/d1_enc.c
@@ -249,7 +249,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