crypto: pcrypt - Fix use after free on padata_free
Subsystems (2)
Steffen Klassert
maintainerPATCH 1/1 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.
--- crypto/pcrypt.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
crypto/pcrypt.c +0 -1
@@ -504,7 +504,6 @@ err:static void pcrypt_fini_padata (struct padata_pcrypt *pcrypt) { -kobject_put (&pcrypt->pinst->kobj);free_cpumask_var (pcrypt->cb_cpumask->mask);kfree (pcrypt->cb_cpumask);
Signature · 1 line
1.7.0.4
Herbert Xu
maintainerQuoted 7 lines · Steffen Klassert
kobject_putis called frompadata_freefor the padata kobject. The kobject's release function frees the padata instance, so don't callkobject_putfor the padata kobject from pcrypt.Reported-by Randy Dunlap <[email protected]>Signed-off-by Steffen Klassert <[email protected]>Tested-by Randy Dunlap <[email protected]>
Linus has already taken this patch.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Steffen Klassert
maintainerQuoted 11 lines · Herbert Xu
Quoted 7 lines · Steffen Klassert
kobject_putis called frompadata_freefor the padata kobject. The kobject's release function frees the padata instance, so don't callkobject_putfor the padata kobject from pcrypt.Reported-by Randy Dunlap <[email protected]>Signed-off-by Steffen Klassert <[email protected]>Tested-by Randy Dunlap <[email protected]>Linus has already taken this patch.
Ok, I applied it on top of crypto-2.6. So I did not notice that it is already in Linus tree.
Steffen