Skip to content

Commit 7031ecf

Browse files
committed
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
2 parents bc570c1 + c9cc051 commit 7031ecf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/tee/amdtee/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
config AMDTEE
44
tristate "AMD-TEE"
55
default m
6-
depends on CRYPTO_DEV_SP_PSP
6+
depends on CRYPTO_DEV_SP_PSP && CRYPTO_DEV_CCP_DD
77
help
88
This implements AMD's Trusted Execution Environment (TEE) driver.

lib/crypto/chacha20poly1305.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ bool chacha20poly1305_crypt_sg_inplace(struct scatterlist *src,
235235
__le64 lens[2];
236236
} b __aligned(16);
237237

238+
if (WARN_ON(src_len > INT_MAX))
239+
return false;
240+
238241
chacha_load_key(b.k, key);
239242

240243
b.iv[0] = 0;

0 commit comments

Comments
 (0)