HomeFreeBSD

vmm: Add credential to cdev object

Description

vmm: Add credential to cdev object

Add a credential to the cdev object in sysctl_vmm_create(), then check
that we have the correct credentials in sysctl_vmm_destroy(). This
prevents a process in one jail from opening or destroying the /dev/vmm
file corresponding to a VM in a sibling jail.

Add regression tests.

Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation

(cherry picked from commit a85404906bc8f402318524b4ccd196712fc09fbd)

Details

Provenance
cyril_freebsdfoundation.orgAuthored on Aug 18 2021, 5:41 PM
markjCommitted on Sep 1 2021, 1:07 PM
Parents
rG32d4139b3eb8: fsetown: Avoid process group lock recursion
Branches
Unknown
Tags
Unknown