Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 9d12ba8 ("crypto: brcm - Add Broadcom SPU driver") Cc: <[email protected]> Reported-by: kiyin(尹亮) <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
- Loading branch information