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

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