Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl/dist/ssl pull in upstream rev.22...



details:   https://anonhg.NetBSD.org/src/rev/d1b6de39d51d
branches:  trunk
changeset: 779220:d1b6de39d51d
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri May 11 18:07:33 2012 +0000

description:
pull in upstream rev.22547:
Sanity check record length before skipping explicit IV in TLS 1.2, 1.1
and DTLS to fix DoS attack.
(CVE-2012-2333)

diffstat:

 crypto/external/bsd/openssl/dist/ssl/d1_enc.c |  2 +-
 crypto/external/bsd/openssl/dist/ssl/t1_enc.c |  2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 6f61f6f8dbcf -r d1b6de39d51d crypto/external/bsd/openssl/dist/ssl/d1_enc.c
--- a/crypto/external/bsd/openssl/dist/ssl/d1_enc.c     Fri May 11 17:14:12 2012 +0000
+++ b/crypto/external/bsd/openssl/dist/ssl/d1_enc.c     Fri May 11 18:07:33 2012 +0000
@@ -260,7 +260,7 @@
                                }
                        /* 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
diff -r 6f61f6f8dbcf -r d1b6de39d51d crypto/external/bsd/openssl/dist/ssl/t1_enc.c
--- a/crypto/external/bsd/openssl/dist/ssl/t1_enc.c     Fri May 11 17:14:12 2012 +0000
+++ b/crypto/external/bsd/openssl/dist/ssl/t1_enc.c     Fri May 11 18:07:33 2012 +0000
@@ -823,6 +823,8 @@
                        if (s->version >= TLS1_1_VERSION
                                && EVP_CIPHER_CTX_mode(ds) == EVP_CIPH_CBC_MODE)
                                {
+                               if (bs > (int)rec->length)
+                                       return -1;
                                rec->data += bs;    /* skip the explicit IV */
                                rec->input += bs;
                                rec->length -= bs;



Home | Main Index | Thread Index | Old Index