qemu/hw/pci-host
Xuzhou Cheng 90865af7d9 hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure
pnv_phb3_root_bus_info and pnv_phb4_root_bus_info are missing the
instance_size initialization. This results in accessing out-of-bound
memory when setting 'chip-id' and 'phb-id', and eventually crashes
glib's malloc functionality with the following message:

  "qemu-system-ppc64: GLib: ../glib-2.72.3/glib/gmem.c:131: failed to allocate 3232 bytes"

This issue was noticed only when running qtests with QEMU Windows
32-bit executable. Windows 64-bit, Linux 32/64-bit do not expose
this bug though.

Fixes: 9ae1329ee2 ("ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge")
Fixes: 4f9924c4d4 ("ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <20220920103159.1865256-29-bmeng.cn@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2022-09-20 12:31:53 -03:00
..
bonito.c
designware.c
dino.c
gpex-acpi.c
gpex.c
grackle.c
i440fx.c
Kconfig
meson.build
mv643xx.h
mv64361.c
pam.c
pnv_phb.c ppc/pnv: fix QOM parenting of user creatable root ports 2022-08-31 14:08:06 -03:00
pnv_phb.h ppc/pnv: add pnv-phb-root-port device 2022-08-31 14:08:05 -03:00
pnv_phb3.c hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure 2022-09-20 12:31:53 -03:00
pnv_phb3_msi.c
pnv_phb3_pbcq.c
pnv_phb4.c hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure 2022-09-20 12:31:53 -03:00
pnv_phb4_pec.c ppc/pnv: enable user created pnv-phb for powernv9 2022-08-31 14:08:06 -03:00
ppce500.c
q35.c
raven.c
remote.c
sabre.c
sh_pci.c
trace-events
trace.h
uninorth.c
versatile.c
xen_igd_pt.c
xilinx-pcie.c