diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-02-24 20:40:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-02-24 20:40:23 +0100 |
commit | 7031ecffab86199c2c688f7a723d03dfa6910fa6 (patch) | |
tree | 9e96a5ed577131f1e8814a8b12593d9c7b01ca74 /lib | |
parent | Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff) | |
parent | crypto: chacha20poly1305 - prevent integer overflow on large input (diff) | |
download | linux-7031ecffab86199c2c688f7a723d03dfa6910fa6.tar.xz linux-7031ecffab86199c2c688f7a723d03dfa6910fa6.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 fixes a Kconfig-related build error and an integer overflow in
chacha20poly1305"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: chacha20poly1305 - prevent integer overflow on large input
tee: amdtee: amdtee depends on CRYPTO_DEV_CCP_DD
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crypto/chacha20poly1305.c | 3 |
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; |