mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
Merge tag 'v6.15-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes a regression in padata as well as an ancient double-free bug in af_alg" * tag 'v6.15-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_hash - fix double free in hash_accept padata: do not leak refcount in reorder_work
This commit is contained in:
@@ -265,10 +265,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock,
|
||||
goto out_free_state;
|
||||
|
||||
err = crypto_ahash_import(&ctx2->req, state);
|
||||
if (err) {
|
||||
sock_orphan(sk2);
|
||||
sock_put(sk2);
|
||||
}
|
||||
|
||||
out_free_state:
|
||||
kfree_sensitive(state);
|
||||
|
||||
@@ -358,7 +358,8 @@ static void padata_reorder(struct parallel_data *pd)
|
||||
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
|
||||
*/
|
||||
padata_get_pd(pd);
|
||||
queue_work(pinst->serial_wq, &pd->reorder_work);
|
||||
if (!queue_work(pinst->serial_wq, &pd->reorder_work))
|
||||
padata_put_pd(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user