mbox series

[0/5] crypto: hisilicon - some misc bugfix for SEC engine

Message ID 1627701996-4589-1-git-send-email-yekai13@huawei.com
Headers show
Series crypto: hisilicon - some misc bugfix for SEC engine | expand

Message

yekai (A) July 31, 2021, 3:26 a.m. UTC
some misc bugfix for SEC engine.

Kai Ye (5):
  crypto: hisilicon/sec - fixup icv checking enabled on Kunpeng 930
  crypto: hisilicon/sec - delete the print of fallback tfm application
    failure
  crypto: hisilicon/sec - fix the max length of AAD for the CCM mode
  crypto: hisilicon/sec - fix the CTR mode BD configuration
  crypto: hisilicon/sec - use the correct print format

 drivers/crypto/hisilicon/sec2/sec_crypto.c | 30 ++++++++++++++++++++----------
 drivers/crypto/hisilicon/sec2/sec_crypto.h |  6 ++++--
 2 files changed, 24 insertions(+), 12 deletions(-)

Comments

Herbert Xu Aug. 6, 2021, 8:32 a.m. UTC | #1
On Sat, Jul 31, 2021 at 11:26:34AM +0800, Kai Ye wrote:
>

> @@ -2218,6 +2219,10 @@ static int sec_aead_spec_check(struct sec_ctx *ctx, struct sec_req *sreq)

>  	}

>  

>  	if (c_mode == SEC_CMODE_CCM) {

> +		if (unlikely(req->assoclen > SEC_MAX_CCM_AAD_LEN)) {

> +			dev_err(dev, "CCM input aad parameter is too long!\n");

> +			return -EINVAL;

> +		}


You shouldn't be printing messages on a code path that can be
triggered by userspace without rate limit.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt