qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/pci-host: fix use-after-free in hppa pci-host devices
@ 2025-09-18 11:42 Peter Maydell
  2025-09-18 11:42 ` [PATCH 1/2] hw/pci-host/dino: Don't call pci_register_root_bus() in init Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Maydell @ 2025-09-18 11:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Helge Deller

This patchset fixes use-after-free bugs which show up if you put
some of the hppa pci-host devices through an "init -> deinit" lifecycle,
as the device-introspect-test does.

The problem in both cases is that we were calling pci_register_root_bus()
in instance_init: we should only call this in realize, as all the
other callers do.

These bugs show up if you run 'make check' with an ASAN enabled
build; they are also likely behind the intermittent segfaults
on s390 that RTH has noticed recently.

thanks
-- PMM

Peter Maydell (2):
  hw/pci-host/dino: Don't call pci_register_root_bus() in init
  hw/pci-host/astro: Don't call pci_regsiter_root_bus() in init

 hw/pci-host/astro.c | 27 +++++++-------
 hw/pci-host/dino.c  | 90 +++++++++++++++++++++------------------------
 2 files changed, 55 insertions(+), 62 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-23 23:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 11:42 [PATCH 0/2] hw/pci-host: fix use-after-free in hppa pci-host devices Peter Maydell
2025-09-18 11:42 ` [PATCH 1/2] hw/pci-host/dino: Don't call pci_register_root_bus() in init Peter Maydell
2025-09-22  9:18   ` Alex Bennée
2025-09-18 11:42 ` [PATCH 2/2] hw/pci-host/astro: Don't call pci_regsiter_root_bus() " Peter Maydell
2025-09-18 11:59   ` Peter Maydell
2025-09-22  9:18   ` Alex Bennée
2025-09-22  9:03 ` [PATCH 0/2] hw/pci-host: fix use-after-free in hppa pci-host devices Alex Bennée
2025-09-23 23:53 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).