crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
commit0f00b6feadde1053c64ccd88ed249762bd6ceea0
authorKamil Konieczny <k.konieczny@partner.samsung.com>
Wed, 7 Feb 2018 15:52:09 +0000 (7 16:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:15:43 +0000 (25 11:15 +0100)
tree97b79e4a2ae019e3b6f932d82be9a08bc1112d69
parent52718d4979404e8fc1066ec52f99df40002c1149
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