DragonFlyBSD Kernel Audit
← dashboard
DF-0129

fp_mmap dereferences fp->f_data without NULL check after f_type check

Summary

fp_mmap validates f_type!=DTYPE_VNODE(:459) but dereferences vp=(struct vnode*)fp->f_data(:472) and vp->v_type(:473) without NULL check. Compare line 480 which NULL-checks vp->v_object. Defense-in-depth.