HomeFreeBSD

bhyve: avoid updating fbaddr when vm_mmap_memseg fails

Description

bhyve: avoid updating fbaddr when vm_mmap_memseg fails

In the function pci_fbuf_baraddr the field sc->fbaddr was set with a
user-controlled value, even though the call to vm_mmap_memseg failed.

No security risk as currently sc->fbaddr is not really used in the
source code.

Reported by: Synacktiv
Reviewed by: emaste
Sponsored by: Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D46109

(cherry picked from commit 85707cfdaddc179af8bd2623091eb1b8c58fed4a)

Details

Provenance
khorben_defora.orgAuthored on Jul 24 2024, 8:51 PM
emasteCommitted on Tue, Sep 3, 2:53 PM
Reviewer
emaste
Differential Revision
Restricted Differential Revision
Parents
rG9e8d504bb5a1: pam_xdg: Fix user xdg runtime directory's descriptor leak
Branches
Unknown
Tags
Unknown