Files
linux-stable-mirror/crypto
Herbert XuandGreg Kroah-Hartman 2374c11189 crypto: af_alg - Set merge to zero early in af_alg_sendmsg
[ Upstream commit 9574b2330d ]

If an error causes af_alg_sendmsg to abort, ctx->merge may contain
a garbage value from the previous loop.  This may then trigger a
crash on the next entry into af_alg_sendmsg when it attempts to do
a merge that can't be done.

Fix this by setting ctx->merge to zero near the start of the loop.

Fixes: 8ff590903d ("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>
2025-09-25 11:00:09 +02:00
..
2023-06-23 16:15:36 +08:00
2023-05-24 18:12:33 +08:00
2023-06-16 20:30:35 +08:00
2023-06-27 15:40:24 +08:00
2023-02-14 13:39:33 +08:00
2022-12-02 18:12:40 +08:00
2022-12-02 18:12:40 +08:00
2024-10-04 16:28:49 +02:00