android_kernel_motorola_sm6225/drivers/crypto/bcm
Herbert Xu fc86d27bdb crypto: bcm - Verify GCM/CCM key length in setkey
commit 10a2f0b311094ffd45463a529a410a51ca025f27 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-17 10:12:58 +02:00
..
cipher.c crypto: bcm - Verify GCM/CCM key length in setkey 2020-10-17 10:12:58 +02:00
cipher.h crypto: bcm - Use GCM IV size constant 2017-09-22 17:43:12 +08:00
Makefile
spu.c
spu.h
spu2.c crypto: brcm - Fix SHA3-512 algorithm failure 2017-07-18 17:00:59 +08:00
spu2.h
spum.h
util.c crypto: bcm - Delete an error message for a failed memory allocation in do_shash() 2018-02-22 22:16:59 +08:00
util.h