Page MenuHomeFreeBSD

bhyve: buffer overflow in pci_vtcon_control_send
ClosedPublic

Authored by khorben_defora.org on Wed, Oct 2, 9:51 PM.
Tags
None
Referenced Files
F100469803: D46882.diff
Tue, Oct 15, 8:55 PM
Unknown Object (File)
Tue, Oct 8, 9:08 AM
Unknown Object (File)
Tue, Oct 8, 3:46 AM
Unknown Object (File)
Tue, Oct 8, 3:46 AM
Unknown Object (File)
Tue, Oct 8, 3:12 AM
Unknown Object (File)
Mon, Oct 7, 10:26 PM
Unknown Object (File)
Mon, Oct 7, 12:48 AM
Unknown Object (File)
Thu, Oct 3, 6:25 PM

Details

Summary

This is a follow-up to the fix for HYP-19, addressing another condition where an overflow might still occur. (Spotted by jhb@, thanks!)

Reported by: Synacktiv
Security: HYP-19
Sponsored by: Alpha-Omega Project
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

khorben_defora.org created this object with edit policy "Custom Policy".
khorben_defora.org added a parent revision: Restricted Differential Revision.
markj added inline comments.
usr.sbin/bhyve/pci_virtio_console.c
587

This check should come before the vq_getchain() call. The vq_relchain() call at the out label contains an instance of the overflowing expression.

Moved the sanity check for len to the beginning of pci_vtcon_control_send().

This revision is now accepted and ready to land.Tue, Oct 15, 8:41 PM