]> granicus.if.org Git - openssl/commitdiff
Clear bytes used for block padding of SSL 3.0 records. (CVE-2011-4576)
authorDr. Stephen Henson <steve@openssl.org>
Wed, 4 Jan 2012 23:16:15 +0000 (23:16 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 4 Jan 2012 23:16:15 +0000 (23:16 +0000)
CHANGES
ssl/s3_enc.c

diff --git a/CHANGES b/CHANGES
index 04b14bda8c168e3b50f777bf75b4d8d15f55a0c0..176b6494538e7deb8174d9de3cbd08862490864d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
  Changes between 1.0.0e and 1.0.0f [xx XXX xxxx]
 
+  *) Clear bytes used for block padding of SSL 3.0 records.
+     (CVE-2011-4576)
+     [Adam Langley (Google)]
+
   *) Only allow one SGC handshake restart for SSL/TLS. (CVE-2011-4619)
      [Adam Langley (Google)]
 
index 0ddfe192bc60748e41720c528a93de2622c9bed2..c5df2cb90ae1c34db4bda00773466ad041b32383 100644 (file)
@@ -512,6 +512,9 @@ int ssl3_enc(SSL *s, int send)
 
                        /* we need to add 'i-1' padding bytes */
                        l+=i;
+                       /* the last of these zero bytes will be overwritten
+                        * with the padding length. */
+                       memset(&rec->input[rec->length], 0, i);
                        rec->length+=i;
                        rec->input[l-1]=(i-1);
                        }