HomeFreeBSD

vmm: Add privilege checks to vmmctl operations

Description

vmm: Add privilege checks to vmmctl operations

In preparation for supporting creation of VMs by unprivileged users, add
some restrictions:

  • Disallow creation of non-transient VMs by unprivileged users. That is, if an unprivileged user creates a VM, the VM must be destroyed automatically once the last fd referencing it is gone.
  • Disallow destroying VMs created by a different user, unless the caller has the PRIV_VMM_DESTROY privilege.

Reviewed by: bnovkov
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54740

Details

Provenance
markjAuthored on Feb 19 2026, 2:38 PM
Reviewer
bnovkov
Differential Revision
D54740: vmm: Add privilege checks to vmmctl operations
Parents
rGdcbd1fccdc66: types.h: use central definition of offsetof()
Branches
Unknown
Tags
Unknown