]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: ccp - Fix AES XTS error for request sizes above 4096
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 20 May 2016 22:33:03 +0000 (17:33 -0500)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:21:55 +0000 (17:21 -0500)
commitcc5bf3fc505c46872fc5d3b562e0149cdd0ec2ca
tree56afd0009f1ee60cd53914c3792a5532951fcc2d
parent36a5be3b469c7317cf5eca9fbc8b9ebdd050cafd
crypto: ccp - Fix AES XTS error for request sizes above 4096

Orabug: 25256937

[ Upstream commit ab6a11a7c8ef47f996974dd3c648c2c0b1a36ab1 ]

The ccp-crypto module for AES XTS support has a bug that can allow requests
greater than 4096 bytes in size to be passed to the CCP hardware. The CCP
hardware does not support request sizes larger than 4096, resulting in
incorrect output. The request should actually be handled by the fallback
mechanism instantiated by the ccp-crypto module.

Add a check to insure the request size is less than or equal to the maximum
supported size and use the fallback mechanism if it is not.

Cc: <stable@vger.kernel.org> # 3.14.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit b182f703e49b54b6a7d135b279f4ac53abf337a2)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/crypto/ccp/ccp-crypto-aes-xts.c