aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-06-16 06:02:15 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2014-06-18 07:40:53 -0400
commit6aa8b209f5ef3610d470c519ddd6e6b47e9f6248 (patch)
tree8a9d694297be2e760b078adb24c0fda6dbdb36d1 /arch/arm64
parent8907272849f923a807d33e71e73dfb343bfb34ab (diff)
arm64/crypto: fix data corruption bug in GHASH algorithm
This fixes a bug in the GHASH algorithm resulting in the calculated hash to be incorrect if the input is presented in chunks whose size is not a multiple of 16 bytes. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Fixes: fdd2389457b2 ("arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions") Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/crypto/ghash-ce-glue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c
index b92baf3f68c7..ef6aa69c4e0c 100644
--- a/arch/arm64/crypto/ghash-ce-glue.c
+++ b/arch/arm64/crypto/ghash-ce-glue.c
@@ -72,6 +72,7 @@ static int ghash_update(struct shash_desc *desc, const u8 *src,
72 partial ? ctx->buf : NULL); 72 partial ? ctx->buf : NULL);
73 kernel_neon_end(); 73 kernel_neon_end();
74 src += blocks * GHASH_BLOCK_SIZE; 74 src += blocks * GHASH_BLOCK_SIZE;
75 partial = 0;
75 } 76 }
76 if (len) 77 if (len)
77 memcpy(ctx->buf + partial, src, len); 78 memcpy(ctx->buf + partial, src, len);