]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.32 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Dec 2010 20:26:17 +0000 (12:26 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Dec 2010 20:26:17 +0000 (12:26 -0800)
queue-2.6.32/crypto-padlock-fix-aes-cbc-handling-on-odd-block-sized-input.patch [new file with mode: 0644]
queue-2.6.32/series

diff --git a/queue-2.6.32/crypto-padlock-fix-aes-cbc-handling-on-odd-block-sized-input.patch b/queue-2.6.32/crypto-padlock-fix-aes-cbc-handling-on-odd-block-sized-input.patch
new file mode 100644 (file)
index 0000000..70d8b76
--- /dev/null
@@ -0,0 +1,37 @@
+From c054a076a1bd4731820a9c4d638b13d5c9bf5935 Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Thu, 4 Nov 2010 14:38:39 -0400
+Subject: crypto: padlock - Fix AES-CBC handling on odd-block-sized input
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+commit c054a076a1bd4731820a9c4d638b13d5c9bf5935 upstream.
+
+On certain VIA chipsets AES-CBC requires the input/output to be
+a multiple of 64 bytes.  We had a workaround for this but it was
+buggy as it sent the whole input for processing when it is meant
+to only send the initial number of blocks which makes the rest
+a multiple of 64 bytes.
+
+As expected this causes memory corruption whenever the workaround
+kicks in.
+
+Reported-by: Phil Sutter <phil@nwl.cc>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/crypto/padlock-aes.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/crypto/padlock-aes.c
++++ b/drivers/crypto/padlock-aes.c
+@@ -285,7 +285,7 @@ static inline u8 *padlock_xcrypt_cbc(con
+       if (initial)
+               asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"       /* rep xcryptcbc */
+                             : "+S" (input), "+D" (output), "+a" (iv)
+-                            : "d" (control_word), "b" (key), "c" (count));
++                            : "d" (control_word), "b" (key), "c" (initial));
+       asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"       /* rep xcryptcbc */
+                     : "+S" (input), "+D" (output), "+a" (iv)
index 1fa30963a829431c9b12a390d50af43ed75cff8e..9785a061900fe429aa33a749b851e40e8ea0e58c 100644 (file)
@@ -110,5 +110,6 @@ memory-corruption-in-x.25-facilities-parsing.patch
 can-bcm-fix-minor-heap-overflow.patch
 v4l-dvb-ivtvfb-prevent-reading-uninitialized-stack-memory.patch
 x25-prevent-crashing-when-parsing-bad-x.25-facilities.patch
+crypto-padlock-fix-aes-cbc-handling-on-odd-block-sized-input.patch
 net-truncate-recvfrom-and-sendto-length-to-int_max.patch
 net-limit-socket-i-o-iovec-total-length-to-int_max.patch