]> git.itanic.dy.fi Git - linux-stable/commit
crypto: padlock - Fix AES-CBC handling on odd-block-sized input
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Nov 2010 18:38:39 +0000 (14:38 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:27:10 +0000 (13:27 -0800)
commit86a48e105f8558d15df47d3a71144406337e7790
tree21acabf6bc384e285be9097d9478a23f3517cad6
parent73c9362424d1273be28adedbdab7f52052450ab7
crypto: padlock - Fix AES-CBC handling on odd-block-sized input

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