Commit 29e5b424 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Greg Kroah-Hartman

crypto: sparc - initialize blkcipher.ivsize

commit a66d7f72 upstream.

Some of the crypto algorithms write to the initialization vector,
but no space has been allocated for it. This clobbers adjacent memory.
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31e29b7b
...@@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { { ...@@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = { .blkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE,
.setkey = aes_set_key, .setkey = aes_set_key,
.encrypt = cbc_encrypt, .encrypt = cbc_encrypt,
.decrypt = cbc_decrypt, .decrypt = cbc_decrypt,
...@@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { { ...@@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = { .blkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE,
.setkey = aes_set_key, .setkey = aes_set_key,
.encrypt = ctr_crypt, .encrypt = ctr_crypt,
.decrypt = ctr_crypt, .decrypt = ctr_crypt,
......
...@@ -274,6 +274,7 @@ static struct crypto_alg algs[] = { { ...@@ -274,6 +274,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = { .blkcipher = {
.min_keysize = CAMELLIA_MIN_KEY_SIZE, .min_keysize = CAMELLIA_MIN_KEY_SIZE,
.max_keysize = CAMELLIA_MAX_KEY_SIZE, .max_keysize = CAMELLIA_MAX_KEY_SIZE,
.ivsize = CAMELLIA_BLOCK_SIZE,
.setkey = camellia_set_key, .setkey = camellia_set_key,
.encrypt = cbc_encrypt, .encrypt = cbc_encrypt,
.decrypt = cbc_decrypt, .decrypt = cbc_decrypt,
......
...@@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { { ...@@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = { .blkcipher = {
.min_keysize = DES_KEY_SIZE, .min_keysize = DES_KEY_SIZE,
.max_keysize = DES_KEY_SIZE, .max_keysize = DES_KEY_SIZE,
.ivsize = DES_BLOCK_SIZE,
.setkey = des_set_key, .setkey = des_set_key,
.encrypt = cbc_encrypt, .encrypt = cbc_encrypt,
.decrypt = cbc_decrypt, .decrypt = cbc_decrypt,
...@@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { { ...@@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { {
.blkcipher = { .blkcipher = {
.min_keysize = DES3_EDE_KEY_SIZE, .min_keysize = DES3_EDE_KEY_SIZE,
.max_keysize = DES3_EDE_KEY_SIZE, .max_keysize = DES3_EDE_KEY_SIZE,
.ivsize = DES3_EDE_BLOCK_SIZE,
.setkey = des3_ede_set_key, .setkey = des3_ede_set_key,
.encrypt = cbc3_encrypt, .encrypt = cbc3_encrypt,
.decrypt = cbc3_decrypt, .decrypt = cbc3_decrypt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment