All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] 9p: fix guest-triggered Treaddir/ACPI eject UAF
@ 2026-07-09 14:06 Christian Schoenebeck
  2026-07-09 13:50 ` [PATCH 3/3] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Christian Schoenebeck @ 2026-07-09 14:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-stable, Greg Kurz, Stefano Stabellini, Anthony PERARD,
	Edgar E. Iglesias, Jia Jia

A guest can trigger unplugging 9pfs server's virtio-pci device via ACPI
eject. As a consequence the device is unrealized, server's internal state
is freed while pending coroutines would still have access to them, causing
a potential heap-use-after-free.

Overview Patches:

 - Patch 1: this is the core fix, that drains all PDUs (i.e. coroutines
   that handle individual pending requests in parallel) before freeing
   server state.

 - Patch 2: hardens security by disabling guest triggered ACPI rejects in
   general for 9pfs's virtio transport.

 - Patch 3: fixes a similar identified issue with the Xen transport, even
   though not triggered via ACPI, it is also prone to UAF, plus a resource
   leak.

Independent of this series, it should be considered to globally change the
default value of devices' hotpluggable property from default enabled, to
default disabled. Because as this issue showed, it should be a conscious
decision of developers to explicitly opt-in when knowing that their device
DOES support hot-unplugging AND that it actually makes sense for the device
category. As changing the default value affects a massive amount of devices
in QEMU, I am still investigating this and this is of course not covered yet
by this series.

Christian Schoenebeck (3):
  hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize
  hw/9pfs/virtio: disable hotpluggable property of virtio-9p device
  hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect

 hw/9pfs/virtio-9p-device.c | 2 ++
 hw/9pfs/xen-9p-backend.c   | 4 ++++
 2 files changed, 6 insertions(+)

-- 
2.47.3



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

end of thread, other threads:[~2026-07-20 14:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 14:06 [PATCH 0/3] 9p: fix guest-triggered Treaddir/ACPI eject UAF Christian Schoenebeck
2026-07-09 13:50 ` [PATCH 3/3] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck
2026-07-16 12:32   ` Christian Schoenebeck
2026-07-18  0:46     ` Stefano Stabellini
2026-07-18 15:42       ` Christian Schoenebeck
2026-07-09 13:50 ` [PATCH 2/3] hw/9pfs/virtio: disable hotpluggable property of virtio-9p device Christian Schoenebeck
2026-07-10  7:37   ` Igor Mammedov
2026-07-10  8:06     ` Christian Schoenebeck
2026-07-10 10:23       ` Igor Mammedov
2026-07-10 10:49         ` Christian Schoenebeck
2026-07-10 12:51           ` Igor Mammedov
2026-07-10 14:31             ` Christian Schoenebeck
2026-07-10 14:40               ` Daniel P. Berrangé
2026-07-13  7:49                 ` Igor Mammedov
2026-07-17 14:05                   ` Christian Schoenebeck
2026-07-17 14:16                     ` Daniel P. Berrangé
2026-07-20 11:23                       ` Igor Mammedov
2026-07-20 14:01                         ` Christian Schoenebeck
2026-07-09 13:50 ` [PATCH 1/3] hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize Christian Schoenebeck
2026-07-09 14:20   ` Christian Schoenebeck
2026-07-10  1:39     ` m'te'a physical

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.