crypto: af_alg - Disallow multiple in-flight AIO requests
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 28 Nov 2023 08:25:49 +0000 (16:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:16 +0000 (15:35 -0800)
commite136daaa10e4c6c50a5c0fc9c5f89a6f988fe619
tree53d63049d719d1e2f17010229c152ee68788b9ec
parent1e9d707233980a6da0784387209f044aca810e83
crypto: af_alg - Disallow multiple in-flight AIO requests

[ Upstream commit 67b164a871af1d736f131fd6fe78a610909f06f3 ]

Having multiple in-flight AIO requests results in unpredictable
output because they all share the same IV.  Fix this by only allowing
one request at a time.

Fixes: 83094e5e9e49 ("crypto: af_alg - add async support to algif_aead")
Fixes: a596999b7ddf ("crypto: algif - change algif_skcipher to be asynchronous")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/af_alg.c
include/crypto/if_alg.h