]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: omap-aes - Fix support for unequal lengths
authorVutla, Lokesh <lokeshvutla@ti.com>
Tue, 31 Mar 2015 04:22:25 +0000 (09:52 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:04:08 +0000 (22:04 +0200)
commit8a7e1640e89ee191d677e2d994476ce68e2160ea
tree9b401522a6caf4a4707cbec4de7ab005246c119e
parent1cd176dfd9e5e4d0cae0545fa8c56ecd582b2e9a
crypto: omap-aes - Fix support for unequal lengths

commit 6d7e7e02a044025237b6f62a20521170b794537f upstream.

For cases where total length of an input SGs is not same as
length of the input data for encryption, omap-aes driver
crashes. This happens in the case when IPsec is trying to use
omap-aes driver.

To avoid this, we copy all the pages from the input SG list
into a contiguous buffer and prepare a single element SG list
for this buffer with length as the total bytes to crypt, which is
similar thing that is done in case of unaligned lengths.

Fixes: 6242332ff2f3 ("crypto: omap-aes - Add support for cases of unaligned lengths")
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/omap-aes.c