aboutsummaryrefslogtreecommitdiff
path: root/tests/test-string-output-visitor.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-08-12 08:52:21 +0200
committerPeter Maydell <peter.maydell@linaro.org>2019-08-12 16:36:41 +0100
commit5e7bcdcfe69ce0fad66012b2cfb2035003c37eef (patch)
treee66f9bbf2c6f62b199c85c48155afb2ce1af6d5e /tests/test-string-output-visitor.c
parent864ab314f1d924129d06ac7b571f105a2b76a4b2 (diff)
display/bochs: fix pcie support
Set QEMU_PCI_CAP_EXPRESS unconditionally in init(), then clear it in realize() in case the device is not connected to a PCIe bus. This makes sure the pci config space allocation is big enough, so accessing the PCIe extended config space doesn't overflow the pci config space buffer. PCI(e) config space is guest writable. Writes are limited by write mask (which probably is also filled with random stuff), so the guest can only flip enabled bits. But I suspect it still might be exploitable, so rather serious because it might be a host escape for the guest. On the other hand the device is probably not yet in widespread use. (For a QEMU version without this commit, a mitigation for the bug is available: use "-device bochs-display" as a conventional pci device only.) Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20190812065221.20907-2-kraxel@redhat.com Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/test-string-output-visitor.c')
0 files changed, 0 insertions, 0 deletions