Skip to content

Commit e2b3483

Browse files
klasserttorvalds
authored andcommitted
crypto: pcrypt - Fix use after free on padata_free
kobject_put is called from padata_free for the padata kobject. The kobject's release function frees the padata instance, so don't call kobject_put for the padata kobject from pcrypt. Reported-and-tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bd760e1 commit e2b3483

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎crypto/pcrypt.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ static int pcrypt_init_padata(struct padata_pcrypt *pcrypt,
504504

505505
static void pcrypt_fini_padata(struct padata_pcrypt *pcrypt)
506506
{
507-
kobject_put(&pcrypt->pinst->kobj);
508507
free_cpumask_var(pcrypt->cb_cpumask->mask);
509508
kfree(pcrypt->cb_cpumask);
510509

0 commit comments

Comments
 (0)