[PATCH OLK-5.10] crypto: pcrypt - Fix handling of MAY_BACKLOG requests
From: Herbert Xu <herbert@gondor.apana.org.au> mainline inclusion from mainline-v7.1-rc1 commit 915b692e6cb723aac658c25eb82c58fd81235110 category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15062 CVE: CVE-2026-43493 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- MAY_BACKLOG requests can return EBUSY. Handle them by checking for that value and filtering out EINPROGRESS notifications. Reported-by: Yiming Qian <yimingqian591@gmail.com> Fixes: 5a1436beec57 ("crypto: pcrypt - call the complete function on error") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Conflicts: crypto/pcrypt.c [Only context conflicts.] Signed-off-by: Cai Xinchen <caixinchen1@huawei.com> --- crypto/pcrypt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index 2d7f98709e97..d545549e7a1a 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -69,6 +69,9 @@ static void pcrypt_aead_done(struct crypto_async_request *areq, int err) struct pcrypt_request *preq = aead_request_ctx(req); struct padata_priv *padata = pcrypt_request_padata(preq); + if (err == -EINPROGRESS) + return; + padata->info = err; padata_do_serial(padata); @@ -82,7 +85,7 @@ static void pcrypt_aead_enc(struct padata_priv *padata) ret = crypto_aead_encrypt(req); - if (ret == -EINPROGRESS) + if (ret == -EINPROGRESS || ret == -EBUSY) return; padata->info = ret; @@ -133,7 +136,7 @@ static void pcrypt_aead_dec(struct padata_priv *padata) ret = crypto_aead_decrypt(req); - if (ret == -EINPROGRESS) + if (ret == -EINPROGRESS || ret == -EBUSY) return; padata->info = ret; -- 2.34.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/22856 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/XZY... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/22856 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/XZY...
participants (2)
-
Cai Xinchen -
patchwork bot