HomeFreeBSD

bhyve: fix off by one error in pci_xhci

Description

bhyve: fix off by one error in pci_xhci

The function pci_xhci_find_stream validates that the streamid is valid
but the bound check accepts up to ep_MaxPStreams included.

The bug results in an out-of-bounds write on the heap with controlled
data.

Reported by: Synacktiv
Reviewed by: jhb
Security: FreeBSD-SA-24:12.bhyve
Security: CVE-2024-32668
Security: HYP-04
Sponsored by: The Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45994

(cherry picked from commit 5c9308a4130858598c76f3ae6e3e3dfb41ccfe68)

Details

Provenance
khorben_defora.orgAuthored on Wed, Sep 4, 2:38 PM
emasteCommitted on Wed, Sep 4, 2:59 PM
Reviewer
jhb
Differential Revision
Restricted Differential Revision
Parents
rG6ce4821f0859: bhyve: fix Out-Of-Bounds read/write heap in tpm_ppi_mem_handler
Branches
Unknown
Tags
Unknown