crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
authorKamil Konieczny <k.konieczny@partner.samsung.com>
Wed, 7 Feb 2018 15:52:09 +0000 (16:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:08:04 +0000 (11:08 +0100)
commit95c0853883973c9c065959a33208751dcf8c57d1
treef96e910494a8de225c086750abc6475743938e93
parentfc4cb30f2cd5f42631f81cb7afb7f5b325f5a23a
crypto: s5p-sss - Fix kernel Oops in AES-ECB mode

commit c927b080c67e3e97193c81fc1d27f4251bf4e036 upstream.

In AES-ECB mode crypt is done with key only, so any use of IV
can cause kernel Oops. Use IV only in AES-CBC and AES-CTR.

Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
Reported-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Cc: stable@vger.kernel.org # can be applied after commit 8f9702aad138
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/s5p-sss.c