opnsense-src/sys/dev/beri
Pierre Pronchery 869d760cb9 bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon()
Avoid a race condition when accessing guest memory, by reading memory
contents only once.

This has also been applied to _vq_record() in
sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion.

Reported by:	Synacktiv
Reviewed by:	markj
Security:	HYP-10
Sponsored by:	The Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D45735
2024-09-27 10:20:53 -04:00
..
virtio bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() 2024-09-27 10:20:53 -04:00
beri_mem.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
beri_ring.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00