]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: af_alg - Fix regression on empty requests
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 2 Jul 2020 03:32:21 +0000 (13:32 +1000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:22:43 +0000 (18:22 -0400)
commit546e3961b5d4c6db82cfb441fabb4353940c8f95
treed1a3f44fc3dbed2ac967b0176afa1b939b75aae6
parent2342b05ec5342a519e00524a507f7a6ea6791a38
crypto: af_alg - Fix regression on empty requests

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@linux.vnet.ibm.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/af_alg.c