This is a note to let you know that I've just added the patch titled crypto: af_alg - Fix regression on empty requests to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-af_alg-fix-regression-on-empty-requests.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 662bb52f50bca16a74fe92b487a14d7dccb85e1a Mon Sep 17 00:00:00 2001 From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Date: Thu, 2 Jul 2020 13:32:21 +1000 Subject: crypto: af_alg - Fix regression on empty requests From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> commit 662bb52f50bca16a74fe92b487a14d7dccb85e1a upstream. Some user-space programs rely on crypto requests that have no control metadata. This broke when a check was added to require the presence of control metadata with the ctx->init flag. This patch fixes the regression by setting ctx->init as long as one sendmsg(2) has been made, with or without a control message. Reported-by: Sachin Sant <sachinp@xxxxxxxxxxxxxxxxxx> Reported-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- crypto/af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -864,6 +864,7 @@ int af_alg_sendmsg(struct socket *sock, err = -EINVAL; goto unlock; } + ctx->init = true; if (init) { ctx->enc = enc; @@ -871,7 +872,6 @@ int af_alg_sendmsg(struct socket *sock, memcpy(ctx->iv, con.iv->iv, ivsize); ctx->aead_assoclen = con.aead_assoclen; - ctx->init = true; } while (size) { Patches currently in stable-queue which might be from herbert@xxxxxxxxxxxxxxxxxxx are queue-4.19/crypto-af_alg-fix-regression-on-empty-requests.patch queue-4.19/crypto-arm-rename-functions-to-avoid-conflict-with-c.patch queue-4.19/crypto-af_alg-work-around-empty-control-messages-without-msg_more.patch queue-4.19/crypto-algif_aead-only-wake-up-when-ctx-more-is-zero.patch queue-4.19/crypto-algif_aead-fix-uninitialized-ctx-init.patch queue-4.19/crypto-arm-sha-fix-function-cast-warnings.patch queue-4.19/crypto-af_alg-make-some-functions-static.patch