What | Removed | Added |
---|---|---|
CC | tiwai@suse.com |
(In reply to Avinesh Kumar from comment #1) > > git show ce212d2afca47acd366a2e74c76fe82c31f785ab > commit ce212d2afca47acd366a2e74c76fe82c31f785ab > Author: Herbert Xu <herbert@gondor.apana.org.au> > Date: Tue Sep 10 17:30:24 2024 +0800 > > crypto: n2 - Set err to EINVAL if snprintf fails for hmac > > Return EINVAL if the snprintf check fails when constructing the > algorithm names. > > Fixes: 8c20982caca4 ("crypto: n2 - Silence gcc format-truncation false > positive warnings") > Reported-by: kernel test robot <lkp@intel.com> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org> > Closes: https://lore.kernel.org/r/202409090726.TP0WfY7p-lkp@intel.com/ > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c > index 251e088a53df..b11545cc5cb7 100644 > --- a/drivers/crypto/n2_core.c > +++ b/drivers/crypto/n2_core.c > @@ -1353,6 +1353,7 @@ static int __n2_register_one_hmac(struct n2_ahash_alg > *n2ahash) > ahash->setkey = n2_hmac_async_setkey; > > base = &ahash->halg.base; > + err = -EINVAL; > if (snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)", > p->child_alg) >= CRYPTO_MAX_ALG_NAME) > goto out_free_p; > _______________ > > > this commit might be related which went in 6.12-rc1 is related. Hm, this driver is for Niagara2 on Sparc64, hence it must be irrelevant. But there can be other crypto changes that return -EINVAL.