Herbert Xu 24c890dd71 crypto: algif_hash - Remove bogus SGL free on zero-length error path
When a zero-length message is hashed by algif_hash, and an error
is triggered, it tries to free an SG list that was never allocated
in the first place.  Fix this by not freeing the SG list on the
zero-length error path.

Reported-by: Shigeru Yoshida <syoshida@redhat.com>
Reported-by: xingwei lee <xrivendell7@gmail.com>
Fixes: b6d972f68983 ("crypto: af_alg/hash: Fix recvmsg() after sendmsg(MSG_MORE)")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reported-by: syzbot+3266db0c26d1fbbe3abb@syzkaller.appspotmail.com
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-02-02 18:08:12 +08:00
..
2023-09-20 13:15:29 +08:00
2023-12-08 11:59:46 +08:00
2024-02-02 18:08:12 +08:00
2023-11-17 19:16:29 +08:00
2021-03-26 19:55:55 +11:00
2023-02-14 13:39:33 +08:00
2023-06-27 15:40:24 +08:00
2023-12-08 11:59:46 +08:00
2023-12-08 11:59:46 +08:00
2020-02-28 08:43:21 +08:00
2023-02-14 13:39:33 +08:00
2022-12-02 18:12:40 +08:00
2022-04-08 16:12:46 +08:00
2023-12-08 11:59:46 +08:00
2022-12-02 18:12:40 +08:00
2023-12-08 11:59:46 +08:00
2023-10-27 18:04:24 +08:00
2022-06-10 16:40:16 +08:00
2021-11-08 16:55:21 -08:00