linux_dsm_epyc7002/drivers/crypto/bcm
Herbert Xu 10a2f0b311 crypto: bcm - Verify GCM/CCM key length in setkey
The setkey function for GCM/CCM algorithms didn't verify the key
length before copying the key and subtracting the salt length.

This patch delays the copying of the key til after the verification
has been done.  It also adds checks on the key length to ensure
that it's at least as long as the salt.

Fixes: 9d12ba86f8 ("crypto: brcm - Add Broadcom SPU driver")
Cc: <stable@vger.kernel.org>
Reported-by: kiyin(尹亮) <kiyin@tencent.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-10-08 16:38:06 +11:00
..
cipher.c crypto: bcm - Verify GCM/CCM key length in setkey 2020-10-08 16:38:06 +11:00
cipher.h crypto: bcm-iproc - remove ecb(arc4) support 2020-09-11 14:39:15 +10:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
spu2.c crypto: bcm-iproc - remove ecb(arc4) support 2020-09-11 14:39:15 +10:00
spu2.h crypto: bcm-iproc - remove ecb(arc4) support 2020-09-11 14:39:15 +10:00
spu.c crypto: bcm-iproc - remove ecb(arc4) support 2020-09-11 14:39:15 +10:00
spu.h crypto: bcm-iproc - remove ecb(arc4) support 2020-09-11 14:39:15 +10:00
spum.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 459 2019-06-19 17:09:09 +02:00
util.c crypto: bcm - Use scnprintf() for avoiding potential buffer overflow 2020-03-20 14:36:51 +11:00
util.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 459 2019-06-19 17:09:09 +02:00