summaryrefslogtreecommitdiffstats
path: root/arch/sparc/crypto/des_glue.c
diff options
context:
space:
mode:
authorDave Kleikamp2015-10-05 17:08:51 +0200
committerHerbert Xu2015-10-08 15:36:48 +0200
commita66d7f724a96d6fd279bfbd2ee488def6b081bea (patch)
tree2a5694986c166829d4959eaafe217491c9944abc /arch/sparc/crypto/des_glue.c
parenthwrng: xgene - fix handling platform_get_irq (diff)
downloadkernel-qcow2-linux-a66d7f724a96d6fd279bfbd2ee488def6b081bea.tar.gz
kernel-qcow2-linux-a66d7f724a96d6fd279bfbd2ee488def6b081bea.tar.xz
kernel-qcow2-linux-a66d7f724a96d6fd279bfbd2ee488def6b081bea.zip
crypto: sparc - initialize blkcipher.ivsize
Some of the crypto algorithms write to the initialization vector, but no space has been allocated for it. This clobbers adjacent memory. Cc: stable@vger.kernel.org Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/sparc/crypto/des_glue.c')
-rw-r--r--arch/sparc/crypto/des_glue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c
index dd6a34fa6e19..61af794aa2d3 100644
--- a/arch/sparc/crypto/des_glue.c
+++ b/arch/sparc/crypto/des_glue.c
@@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = {
.min_keysize = DES_KEY_SIZE,
.max_keysize = DES_KEY_SIZE,
+ .ivsize = DES_BLOCK_SIZE,
.setkey = des_set_key,
.encrypt = cbc_encrypt,
.decrypt = cbc_decrypt,
@@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = {
.min_keysize = DES3_EDE_KEY_SIZE,
.max_keysize = DES3_EDE_KEY_SIZE,
+ .ivsize = DES3_EDE_BLOCK_SIZE,
.setkey = des3_ede_set_key,
.encrypt = cbc3_encrypt,
.decrypt = cbc3_decrypt,