HomeFreeBSD

vfs: plug a use-after-free of fd_rdir in namei

Description

vfs: plug a use-after-free of fd_rdir in namei

fd_rdir vnode was stored in ni_rootdir without refing it in any way,
after which the filedsc lock was being dropped.

The vnode could have been freed by mountcheckdirs or another thread doing
chroot.

VREF the vnode while the lock is held.

Reviewed by: kib
MFC after: 1 week

Details

Provenance
mjgAuthored on
Reviewer
kib
Parents
rS285318: Do not try to set password on group if the group is added as a consequence of
Branches
Unknown
Tags
Unknown