summaryrefslogtreecommitdiff
path: root/crypto/salsa20_generic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-11 16:32:45 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-11 16:32:45 -0800
commit479a1006060c7452064ee0c83b25c7e648c479aa (patch)
tree56210bc618bbd39835402a583f5bd9b41c191989 /crypto/salsa20_generic.c
parent8dce1988dfaa3668372990f05ee2202d9d9521b5 (diff)
parent2bc89034e4e02fff5b5375dd7ecff41dd0e0f3eb (diff)
downloadlinux-crypto-479a1006060c7452064ee0c83b25c7e648c479aa.tar.gz
linux-crypto-479a1006060c7452064ee0c83b25c7e648c479aa.zip
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This push fixes the following issues: - buffer overread in RSA - potential use after free in algif_aead. - error path null pointer dereference in af_alg - forbid combinations such as hmac(hmac(sha3)) which may crash - crash in salsa20 due to incorrect API usage" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: salsa20 - fix blkcipher_walk API usage crypto: hmac - require that the underlying hash algorithm is unkeyed crypto: af_alg - fix NULL pointer dereference in crypto: algif_aead - fix reference counting of null skcipher crypto: rsa - fix buffer overread when stripping leading zeroes
Diffstat (limited to '')
-rw-r--r--crypto/salsa20_generic.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c
index f550b5d9..d7da0eea 100644
--- a/crypto/salsa20_generic.c
+++ b/crypto/salsa20_generic.c
@@ -188,13 +188,6 @@ static int encrypt(struct blkcipher_desc *desc,
salsa20_ivsetup(ctx, walk.iv);
- if (likely(walk.nbytes == nbytes))
- {
- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
- walk.src.virt.addr, nbytes);
- return blkcipher_walk_done(desc, &walk, 0);
- }
-
while (walk.nbytes >= 64) {
salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
walk.src.virt.addr,