KEYS: Fix skcipher IV clobbering
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Sep 2016 12:35:55 +0000 (20:35 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 09:42:07 +0000 (17:42 +0800)
commit456bee986e0a372ad4beed5d3cedb3622633d9df
treef15f1e438e2b88d6ecae117947a9cf90de1f28ba
parent2db34e78f126c6001d79d3b66ab1abb482dc7caa
KEYS: Fix skcipher IV clobbering

The IV must not be modified by the skcipher operation so we need
to duplicate it.

Fixes: c3917fd9dfbc ("KEYS: Use skcipher")
Cc: stable@vger.kernel.org
Reported-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
security/keys/encrypted-keys/encrypted.c