Skip to content
Snippets Groups Projects
Commit 24c890dd authored by Herbert Xu's avatar Herbert Xu
Browse files

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: default avatarShigeru Yoshida <syoshida@redhat.com>
Reported-by: default avatarxingwei lee <xrivendell7@gmail.com>
Fixes: b6d972f6 ("crypto: af_alg/hash: Fix recvmsg() after sendmsg(MSG_MORE)")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reported-by: default avatar <syzbot+3266db0c26d1fbbe3abb@syzkaller.appspotmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 69fba378
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment