diff for duplicates of <cb1188757edab9b056961d4d2441be009ac73ce8.1775217403.git.kanolyc@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 5dcf68e..6643443 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -22,32 +22,41 @@ authsize. Fixes: f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver") Cc: stable@kernel.org -Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> -Reported-by: Xin Liu <bird@lzu.edu.cn> +Co-developed-by: Yuan Tan <yuantan098@gmail.com> +Signed-off-by: Yuan Tan <yuantan098@gmail.com> +Suggested-by: Xin Liu <bird@lzu.edu.cn> Tested-by: Yuhang Zheng <z1652074432@gmail.com> +Reviewed-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Yucheng Lu <kanolyc@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> --- +changes in v2: + - move the short digest size check to immediately after + auth_base = &auth->base; + - add Reviewed-by from Eric Biggers + - fix the stable@kernel.org address typo + - Link: https://lore.kernel.org/all/cb1188757edab9b056961d4d2441be009ac73ce8.1775217403.git.kanolyc@gmail.com/ + crypto/authencesn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/authencesn.c b/crypto/authencesn.c -index 542a978663b9..bf44f035f7f8 100644 +index 542a978663b9..f6ac9eefc7d9 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c -@@ -384,6 +384,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl, - goto err_free_inst; - enc = crypto_spawn_skcipher_alg_common(&ctx->enc); +@@ -378,6 +378,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl, + auth = crypto_spawn_ahash_alg(&ctx->auth); + auth_base = &auth->base; + if (auth->digestsize > 0 && auth->digestsize < 4) { + err = -EINVAL; + goto err_free_inst; + } + - err = -ENAMETOOLONG; - if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, - "authencesn(%s,%s)", auth_base->cra_name, + err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst), + crypto_attr_alg_name(tb[2]), 0, mask); + if (err) -- 2.47.3 diff --git a/a/content_digest b/N1/content_digest index 759a58b..65d5b24 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,16 +1,17 @@ "ref\0cover.1775217403.git.kanolyc@gmail.com\0" "From\0Ren Wei <n05ec@lzu.edu.cn>\0" - "Subject\0[PATCH 1/1] crypto: authencesn: reject short ahash digests during instance creation\0" - "Date\0Mon, 20 Apr 2026 16:48:25 +0800\0" + "Subject\0[PATCH v2 1/1] crypto: authencesn: reject short ahash digests during instance creation\0" + "Date\0Wed, 22 Apr 2026 21:45:04 +0800\0" "To\0linux-crypto@vger.kernel.org\0" "Cc\0herbert@gondor.apana.org.au" davem@davemloft.net ardb@kernel.org - yuantan098@gmail.com yifanwucs@gmail.com tomapufckgml@gmail.com + yuantan098@gmail.com bird@lzu.edu.cn z1652074432@gmail.com + ebiggers@kernel.org kanolyc@gmail.com " n05ec@lzu.edu.cn\0" "\00:1\0" @@ -39,34 +40,43 @@ "\n" "Fixes: f15f05b0a5de (\"crypto: ccm - switch to separate cbcmac driver\")\n" "Cc: stable@kernel.org\n" - "Reported-by: Yuan Tan <yuantan098@gmail.com>\n" "Reported-by: Yifan Wu <yifanwucs@gmail.com>\n" "Reported-by: Juefei Pu <tomapufckgml@gmail.com>\n" - "Reported-by: Xin Liu <bird@lzu.edu.cn>\n" + "Co-developed-by: Yuan Tan <yuantan098@gmail.com>\n" + "Signed-off-by: Yuan Tan <yuantan098@gmail.com>\n" + "Suggested-by: Xin Liu <bird@lzu.edu.cn>\n" "Tested-by: Yuhang Zheng <z1652074432@gmail.com>\n" + "Reviewed-by: Eric Biggers <ebiggers@kernel.org>\n" "Signed-off-by: Yucheng Lu <kanolyc@gmail.com>\n" "Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>\n" "---\n" + "changes in v2:\n" + " - move the short digest size check to immediately after\n" + " auth_base = &auth->base;\n" + " - add Reviewed-by from Eric Biggers\n" + " - fix the stable@kernel.org address typo\n" + " - Link: https://lore.kernel.org/all/cb1188757edab9b056961d4d2441be009ac73ce8.1775217403.git.kanolyc@gmail.com/\n" + "\n" " crypto/authencesn.c | 5 +++++\n" " 1 file changed, 5 insertions(+)\n" "\n" "diff --git a/crypto/authencesn.c b/crypto/authencesn.c\n" - "index 542a978663b9..bf44f035f7f8 100644\n" + "index 542a978663b9..f6ac9eefc7d9 100644\n" "--- a/crypto/authencesn.c\n" "+++ b/crypto/authencesn.c\n" - "@@ -384,6 +384,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,\n" - " \t\tgoto err_free_inst;\n" - " \tenc = crypto_spawn_skcipher_alg_common(&ctx->enc);\n" + "@@ -378,6 +378,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,\n" + " \tauth = crypto_spawn_ahash_alg(&ctx->auth);\n" + " \tauth_base = &auth->base;\n" " \n" "+\tif (auth->digestsize > 0 && auth->digestsize < 4) {\n" "+\t\terr = -EINVAL;\n" "+\t\tgoto err_free_inst;\n" "+\t}\n" "+\n" - " \terr = -ENAMETOOLONG;\n" - " \tif (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,\n" - " \t\t \"authencesn(%s,%s)\", auth_base->cra_name,\n" + " \terr = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst),\n" + " \t\t\t\t crypto_attr_alg_name(tb[2]), 0, mask);\n" + " \tif (err)\n" "-- \n" 2.47.3 -55238fef73608077e2b91d6a25e8bbf3c99a6e2837ba005953124cdf92f556e4 +8cd39276c3494ca37b5b6db498e25d7ec2675bab3dfa6e784e3cc744e54cfb6f
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox