Blame SOURCES/openssl-fips-0.9.8e-cve-2012-2333.patch

c4366c
Sanity check record length before skipping explicit IV in DTLS
c4366c
to fix DoS attack.
c4366c
Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic
c4366c
fuzzing as a service testing platform.
c4366c
(CVE-2012-2333)
c4366c
diff -up openssl-fips-0.9.8e/ssl/d1_enc.c.reclen openssl-fips-0.9.8e/ssl/d1_enc.c
c4366c
--- openssl-fips-0.9.8e/ssl/d1_enc.c.reclen	2006-02-08 20:16:32.000000000 +0100
c4366c
+++ openssl-fips-0.9.8e/ssl/d1_enc.c	2012-05-15 12:14:25.510013029 +0200
c4366c
@@ -252,7 +252,7 @@ int dtls1_enc(SSL *s, int send)
c4366c
 				}
c4366c
 			/* TLS 1.0 does not bound the number of padding bytes by the block size.
c4366c
 			 * All of them must have value 'padding_length'. */
c4366c
-			if (i > (int)rec->length)
c4366c
+			if (i + bs > (int)rec->length)
c4366c
 				{
c4366c
 				/* Incorrect padding. SSLerr() and ssl3_alert are done
c4366c
 				 * by caller: we don't want to reveal whether this is