Page MenuHomeFreeBSD

bhyve: buffer overflow in pci_vtcon_control_send
ClosedPublic

Authored by khorben on Oct 2 2024, 9:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 18, 5:15 PM
Unknown Object (File)
Tue, May 12, 4:59 PM
Unknown Object (File)
Tue, May 12, 11:51 AM
Unknown Object (File)
Tue, May 12, 6:53 AM
Unknown Object (File)
Tue, May 12, 6:52 AM
Unknown Object (File)
Mon, May 11, 10:14 PM
Unknown Object (File)
Thu, Apr 30, 10:37 AM
Unknown Object (File)
Tue, Apr 28, 3:02 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 Skipped
Unit
Tests Skipped

Event Timeline

khorben created this object with edit policy "Custom Policy".
khorben 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.Oct 15 2024, 8:41 PM