mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Fix use-after-free bugs in icp code
These were reported by Coverity as "Read from pointer after free" bugs. Presumably, it did not report it as a use-after-free bug because it does not understand the inline assembly that implements the atomic instruction. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #13881
This commit is contained in:
parent
6f8602a5ed
commit
fd8c3012b3
@ -342,8 +342,8 @@ kcf_remove_mech_provider(const char *mech_name, kcf_provider_desc_t *prov_desc)
|
||||
mech_entry->me_sw_prov = NULL;
|
||||
|
||||
/* free entry */
|
||||
KCF_PROV_REFRELE(prov_mech->pm_prov_desc);
|
||||
KCF_PROV_IREFRELE(prov_mech->pm_prov_desc);
|
||||
KCF_PROV_REFRELE(prov_mech->pm_prov_desc);
|
||||
kmem_free(prov_mech, sizeof (kcf_prov_mech_desc_t));
|
||||
}
|
||||
|
||||
|
@ -158,8 +158,8 @@ kcf_prov_tab_rem_provider(crypto_provider_id_t prov_id)
|
||||
* at that time.
|
||||
*/
|
||||
|
||||
KCF_PROV_REFRELE(prov_desc);
|
||||
KCF_PROV_IREFRELE(prov_desc);
|
||||
KCF_PROV_REFRELE(prov_desc);
|
||||
|
||||
return (CRYPTO_SUCCESS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user