CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/11/26 13:10:19

Modified files:
        usr.sbin/vmd   : vmd.c 

Log message:
Prevent user-after-free on ephemeral VM startup failure

'vmctl start -d/ oops' as root is enough to kill vmd(8).

Unless 'vm_from_config', vmd_dispatch_control() first through config_setvm()
vm_remove()s such VMs, i.e. frees their 'vm', then proceeds to access it.

Of three config_setvm() call sites, only this one checks its return code,
so deferring vm_stop()/vm_remove() into call sites would mean more checks.

Cache the condition locally to avoid this.

OK millert dv

Reply via email to