Skip to content

Commit d975fd3

Browse files
committed
crypto: algif_hash - fix double free in hash_accept
jira VULN-70974 cve CVE-2025-38079 commit-author Ivan Pravdin <[email protected]> commit b2df03e If accept(2) is called on socket type algif_hash with MSG_MORE flag set and crypto_ahash_import fails, sk2 is freed. However, it is also freed in af_alg_release, leading to slab-use-after-free error. Fixes: fe869cd ("crypto: algif_hash - User-space interface for hash operations") Cc: <[email protected]> Signed-off-by: Ivan Pravdin <[email protected]> Signed-off-by: Herbert Xu <[email protected]> (cherry picked from commit b2df03e) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 8afbd3c commit d975fd3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

crypto/algif_hash.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
267267
return err;
268268

269269
err = crypto_ahash_import(&ctx2->req, state);
270-
if (err) {
271-
sock_orphan(sk2);
272-
sock_put(sk2);
273-
}
274270

275271
return err;
276272
}

0 commit comments

Comments
 (0)