summaryrefslogtreecommitdiff
path: root/arch/sparc/crypto/des_glue.c
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2015-10-05 18:08:51 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-10-08 16:36:48 +0300
commita66d7f724a96d6fd279bfbd2ee488def6b081bea (patch)
tree2a5694986c166829d4959eaafe217491c9944abc /arch/sparc/crypto/des_glue.c
parent09185e2756a83763bcbfe51b308b85979f0de027 (diff)
downloadlinux-a66d7f724a96d6fd279bfbd2ee488def6b081bea.tar.xz
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,