diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-24 06:31:54 +0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-24 06:31:54 +0800 |
commit | c5c0586a6771a33a5da7985495c1beab72d292b1 (patch) | |
tree | a573d3a85920efb639707e6e528e0cac59666199 /crypto/morus640.c | |
parent | 74166d72810cbba7a17154caee1a182e361247b1 (diff) | |
parent | 366a20ff6c66ccac3af29059fd5dda09011321e3 (diff) | |
download | linux-crypto-c5c0586a6771a33a5da7985495c1beab72d292b1.tar.gz linux-crypto-c5c0586a6771a33a5da7985495c1beab72d292b1.zip |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- Fix use after free in chtls
- Fix RBP breakage in sha3
- Fix use after free in hwrng_unregister
- Fix overread in morus640
- Move sleep out of kernel_neon in arm64/aes-blk
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
hwrng: core - Always drop the RNG in hwrng_unregister()
crypto: morus640 - Fix out-of-bounds access
crypto: don't optimize keccakf()
crypto: arm64/aes-blk - fix and move skcipher_walk_done out of kernel_neon_begin, _end
crypto: chtls - use after free in chtls_pt_recvmsg()
Diffstat (limited to 'crypto/morus640.c')
-rw-r--r-- | crypto/morus640.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/morus640.c b/crypto/morus640.c index 9fbcde30..5eede374 100644 --- a/crypto/morus640.c +++ b/crypto/morus640.c @@ -274,8 +274,9 @@ static void crypto_morus640_decrypt_chunk(struct morus640_state *state, u8 *dst, union morus640_block_in tail; memcpy(tail.bytes, src, size); + memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size); - crypto_morus640_load_a(&m, src); + crypto_morus640_load_a(&m, tail.bytes); crypto_morus640_core(state, &m); crypto_morus640_store_a(tail.bytes, &m); memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size); |