]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jun 2016 17:18:19 +0000 (10:18 -0700)
commit774920eece6e15f6560ba0ad5a9b25eb43d075fe
treecf5e16832cce0b789bad8718ff14e81b1f51851f
parentb440f3ae617bd81a5699bbba5120c8f54c456f81
crypto: ccp - Fix AES XTS error for request sizes above 4096

commit ab6a11a7c8ef47f996974dd3c648c2c0b1a36ab1 upstream.

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.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-crypto-aes-xts.c