diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2020-10-02 17:55:22 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-10-08 16:38:06 +1100 |
commit | 10a2f0b311094ffd45463a529a410a51ca025f27 (patch) | |
tree | 94d9d26368ca785407ce84b986ced8084beaf565 /crypto | |
parent | 789f900b70b9125ed473e1eb4699dc7d298694e7 (diff) |
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: 9d12ba86f818 ("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>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions