mirror_zfs/module/os/freebsd/zfs
Chunwei Chen c6dab6dd39
Fix unprotected zfs_znode_dmu_fini
In original code, zfs_znode_dmu_fini is called in zfs_rmnode without
zfs_znode_hold_enter. It seems to assume it's ok to do so when the znode
is unlinked. However this assumption is not correct, as zfs_zget can be
called by NFS through zpl_fh_to_dentry as pointed out by Christian in
https://github.com/openzfs/zfs/pull/12767, which could result in a
use-after-free bug.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #12767 
Closes #14364
2023-01-19 16:59:05 -08:00
..
abd_os.c FreeBSD: use zero_region instead of allocating a dedicated page 2022-05-04 11:46:37 -07:00
arc_os.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
crypto_os.c FreeBSD: Improve crypto_dispatch() handling 2022-06-17 15:38:51 -07:00
dmu_os.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
event_os.c FreeBSD: add knlist_init_sx() for exclusive locks 2022-09-06 09:48:57 -07:00
hkdf.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
kmod_core.c FreeBSD: Remove stray debug printf 2022-12-13 17:35:07 -08:00
spa_os.c FreeBSD: Fix potential boot panic with bad label 2022-12-22 11:50:09 -08:00
sysctl_os.c Turn default_bs and default_ibs into ZFS_MODULE_PARAMs 2023-01-11 09:38:20 -08:00
vdev_file.c Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
vdev_geom.c Improve too large physical ashift handling 2022-09-08 10:30:53 -07:00
vdev_label_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_acl.c Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
zfs_ctldir.c FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK 2022-09-19 17:17:27 -07:00
zfs_debug.c Cleanup: Replace oldstyle struct hack with C99 flexible array members 2023-01-12 16:00:03 -08:00
zfs_dir.c Fix unprotected zfs_znode_dmu_fini 2023-01-19 16:59:05 -08:00
zfs_file_os.c FreeBSD: handle V_PCATCH 2022-09-20 15:22:32 -07:00
zfs_ioctl_compat.c freebsd: add ifdefs around legacy ioctl support 2022-11-07 15:55:26 -08:00
zfs_ioctl_os.c libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat 2021-06-08 07:36:43 -06:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_vfsops.c FreeBSD: zfs_register_callbacks() must implement error check correctly 2022-12-05 10:16:50 -08:00
zfs_vnops_os.c FreeBSD: stop using buffer cache-only routines on sync 2022-11-29 09:35:25 -08:00
zfs_znode.c Fix unprotected zfs_znode_dmu_fini 2023-01-19 16:59:05 -08:00
zio_crypt.c Cleanup: Use kmem_zalloc() instead of memset() to zero memory 2023-01-12 15:59:28 -08:00
zvol_os.c Optionally skip zil_close during zvol_create_minor_impl 2022-11-08 12:38:08 -08:00