Blame SOURCES/gnutls-3.3.29-cbc-mac-verify-ssl3-min-pad.patch

b88a44
diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
b88a44
index 65dde6899..8b34472b7 100644
b88a44
--- a/lib/gnutls_cipher.c
b88a44
+++ b/lib/gnutls_cipher.c
b88a44
@@ -659,7 +659,11 @@ ciphertext_to_compressed(gnutls_session_t session,
b88a44
 		 * Note that we access all 256 bytes of ciphertext for padding check
b88a44
 		 * because there is a timing channel in that memory access (in certain CPUs).
b88a44
 		 */
b88a44
-		if (ver->id != GNUTLS_SSL3)
b88a44
+		if (ver->id == GNUTLS_SSL3) {
b88a44
+			if (pad >= blocksize)
b88a44
+				pad_failed = 1;
b88a44
+		} else
b88a44
+		{
b88a44
 			for (i = 2; i <= MIN(256, ciphertext->size); i++) {
b88a44
 				tmp_pad_failed |=
b88a44
 				    (compressed->
b88a44
@@ -667,6 +671,7 @@ ciphertext_to_compressed(gnutls_session_t session,
b88a44
 				pad_failed |=
b88a44
 				    ((i <= (1 + pad)) & (tmp_pad_failed));
b88a44
 			}
b88a44
+		}
b88a44
 
b88a44
 		if (unlikely
b88a44
 		    (pad_failed != 0
b88a44
-- 
b88a44
2.14.3
b88a44