Skip to content
Commit 10a2f0b3 authored by Herbert Xu's avatar Herbert Xu
Browse files

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: 9d12ba86 ("crypto: brcm - Add Broadcom SPU driver")
Cc: <stable@vger.kernel.org>
Reported-by: default avatarkiyin(尹亮) <kiyin@tencent.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 789f900b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment