This push fixes regressions in cbc and algif_hash, as well as an
older NULL-pointer dereference in ccp.
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 <>
Reported-by: xingwei lee <>
Fixes: b6d972f68983 ("crypto: af_alg/hash: Fix recvmsg() after sendmsg(MSG_MORE)")
Cc: <>
Signed-off-by: Herbert Xu <>
Signed-off-by: Herbert Xu <>
1 file changed