Browse Source

Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This fixes a memory corruption bug in ghash-clmulni-intel due to
  insufficient memory allocation"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ghash-clmulni: specify context size for ghash async algorithm
Linus Torvalds 10 years ago
parent
commit
0c8e2f2c7b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      arch/x86/crypto/ghash-clmulni-intel_glue.c

+ 1 - 0
arch/x86/crypto/ghash-clmulni-intel_glue.c

@@ -294,6 +294,7 @@ static struct ahash_alg ghash_async_alg = {
 			.cra_name		= "ghash",
 			.cra_driver_name	= "ghash-clmulni",
 			.cra_priority		= 400,
+			.cra_ctxsize		= sizeof(struct ghash_async_ctx),
 			.cra_flags		= CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
 			.cra_blocksize		= GHASH_BLOCK_SIZE,
 			.cra_type		= &crypto_ahash_type,