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:05:56 +0000 (11:05 +0100)
commit266da9f8d0e650d1d27e06b9cfdbc47e7ad820f4
tree7157c00ed92e47f95d89fd213c51f7f73e5e20b3
parent04c776eecc6ddf37166cd30f4e9c50d19480b18f
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