CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/10/11 07:27:50

Modified files:
        sys/dev        : Tag: OPENBSD_7_8 video.c 

Log message:
Simplify kern.video.record logic to avoid bcopy with unchecked parameters

kern.video.record was intended to mimic kern.audio.record in handing
over only zeroed frames to userland. The mmap code unconditionally used
bcopy with arguments passed from userland, even on error, which may
result in arbitrary memory zeroing. This is only reachable if the
permissions on /dev/video* have been changed to allow non-root users but
kern.video.record is still zero.

Instead of this complicated logic, keep kern.video.record for now but
turn it into an extra perm check in open(2).

Issue reported by Acts1631 who proposed a different fix. Documentation
changes to follow, courtesy of mglocker@. ok kirill@ mglocker@

Reply via email to