crypto: s390 - fix des and des3_ede cbc concurrency issue
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Wed, 22 Jan 2014 12:00:04 +0000 (13:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Feb 2014 19:07:58 +0000 (11:07 -0800)
commit6414e5ed784678a379e0f4afb023f9cc643e1b33
tree66dd0b59aaa27de4148ed7a5cdfa65b46229c450
parentaa1eef2bdc5187968849e5c78d8d07e567d4889a
crypto: s390 - fix des and des3_ede cbc concurrency issue

commit adc3fcf1552b6e406d172fd9690bbd1395053d13 upstream.

In s390 des and des3_ede cbc mode the iv value is not protected
against concurrency access and modifications from another running
en/decrypt operation which is using the very same tfm struct
instance. This fix copies the iv to the local stack before
the crypto operation and stores the value back when done.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/crypto/des_s390.c