Clear bytes used for block padding of SSL 3.0 records. (CVE-2011-4576)

This commit is contained in:
Dr. Stephen Henson 2012-01-04 18:54:17 +00:00
parent 21c4b25959
commit e643112dd8
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,10 @@
Changes between 0.9.8r and 0.9.8s [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)]

View file

@ -479,6 +479,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);
}