crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
[ Upstream commit 1b34cbbf ] Issuing two writes to the same af_alg socket is bogus as the data will be interleaved in an unpredictable fashion. Furthermore, concurrent writes may create inconsistencies in the internal socket state. Disallow this by adding a new ctx->write field that indiciates exclusive ownership for writing. Fixes: 8ff59090 ("crypto: algif_skcipher - User-space interface for skcipher operations") Reported-by:Muhammad Alifa Ramdhan <ramdhan@starlabs.sg> Reported-by:
Bing-Jhong Billy Jheng <billy@starlabs.sg> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading