CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/12/04 20:02:12

Modified files:
        usr.sbin/vmd   : vioblk.c virtio.c virtio.h 

Log message:
Resolve TOCTOU in vmd(8) virtio by copying descriptor chains.

Adds logic for extracting copies of the descriptor chain to prevent
TOCTOU issues as a device processes the descriptors. Validation is
performed on a copy of the chain and the validated copy is used for
device virtqueue processing.

This commit changes the entropy (viornd) and block (vioblk) devices
to use the new logic. Network and SCSI devices will be migrated
next.

Issue originally found and reported by Acts1631 for the virtio
entropy device. A guest can change the buffer length on a descriptor
after vmd has validated the value but before allocating a host-side
buffer on the heap resulting in leaking host memory to the guest.

ok hshoexer@

Reply via email to