summaryrefslogtreecommitdiffstats
path: root/lib/crypto/chacha20poly1305.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-09 08:38:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-09 08:38:58 +0100
commitbb3a151dd42765acc8f469ff994de3ab31f15a95 (patch)
tree87cd7da605aacb88aae36f4e69f255537e78e8fa /lib/crypto/chacha20poly1305.c
parentMerge 5.6-rc3 into char-misc-next (diff)
parentLinux 5.6-rc5 (diff)
downloadlinux-bb3a151dd42765acc8f469ff994de3ab31f15a95.tar.xz
linux-bb3a151dd42765acc8f469ff994de3ab31f15a95.zip
Merge 5.6-rc5 into char-misc-next
We need the binder and other fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/crypto/chacha20poly1305.c')
-rw-r--r--lib/crypto/chacha20poly1305.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
index 6d83cafebc69..ad0699ce702f 100644
--- a/lib/crypto/chacha20poly1305.c
+++ b/lib/crypto/chacha20poly1305.c
@@ -235,6 +235,9 @@ bool chacha20poly1305_crypt_sg_inplace(struct scatterlist *src,
__le64 lens[2];
} b __aligned(16);
+ if (WARN_ON(src_len > INT_MAX))
+ return false;
+
chacha_load_key(b.k, key);
b.iv[0] = 0;