]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:34 +0000 (13:07 +0200)
commit01c963daaea71791e3ea6a0b1ee594f5f078f528
tree7cf32bb6a544347a0df73ecd761f49feb12d8ee0
parentef73e8f85594ed034ee714b319904219b60c94b8
crypto: af_alg - Fix regression on empty requests

[ Upstream commit 662bb52f50bca16a74fe92b487a14d7dccb85e1a ]

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: Sasha Levin <sashal@kernel.org>
crypto/af_alg.c