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

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