* FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.9-stable tree
@ 2020-06-23 11:54 gregkh
2020-06-23 13:15 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2020-06-23 11:54 UTC (permalink / raw)
To: herbert, smueller, stable; +Cc: stable
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 7cf81954705b7e5b057f7dc39a7ded54422ab6e1 Mon Sep 17 00:00:00 2001
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 29 May 2020 14:54:43 +1000
Subject: [PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used
Somewhere along the line the cap on the SG list length for receive
was lost. This patch restores it and removes the subsequent test
which is now redundant.
Fixes: 2d97591ef43d ("crypto: af_alg - consolidation of...")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index e2c8ab408bed..4c3bdffe0c3a 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -74,14 +74,10 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
return PTR_ERR(areq);
/* convert iovecs of output buffers into RX SGL */
- err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len);
+ err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len);
if (err)
goto free;
- /* Process only as much RX buffers for which we have TX data */
- if (len > ctx->used)
- len = ctx->used;
-
/*
* If more buffers are to be expected to be processed, process only
* full block size buffers.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.9-stable tree
2020-06-23 11:54 FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.9-stable tree gregkh
@ 2020-06-23 13:15 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2020-06-23 13:15 UTC (permalink / raw)
To: gregkh; +Cc: herbert, smueller, stable
On Tue, Jun 23, 2020 at 01:54:47PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.9-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 7cf81954705b7e5b057f7dc39a7ded54422ab6e1 Mon Sep 17 00:00:00 2001
>From: Herbert Xu <herbert@gondor.apana.org.au>
>Date: Fri, 29 May 2020 14:54:43 +1000
>Subject: [PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used
>
>Somewhere along the line the cap on the SG list length for receive
>was lost. This patch restores it and removes the subsequent test
>which is now redundant.
>
>Fixes: 2d97591ef43d ("crypto: af_alg - consolidation of...")
>Cc: <stable@vger.kernel.org>
>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>Reviewed-by: Stephan Mueller <smueller@chronox.de>
>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
We don't have 2d97591ef43d ("crypto: af_alg - consolidation of duplicate
code") in our 4.9 and 4.4 trees.
We do carry an "out of tree" backport that fixes an issue silently fixed
by 2d97591ef43d, but it does not introduce the issue that this patch
fixes.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-23 13:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 11:54 FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.9-stable tree gregkh
2020-06-23 13:15 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).