All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] 9p: fix guest-triggered Treaddir/ACPI eject UAF
@ 2026-07-18 16:50 Christian Schoenebeck
  2026-07-18 16:50 ` [PATCH v2 1/2] hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize Christian Schoenebeck
  2026-07-18 16:50 ` [PATCH v2 2/2] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Schoenebeck @ 2026-07-18 16:50 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: 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.

v2:
  - Patch 1: Make Jia the official author of this patch.
  - Drop prev. patch 2 ("hw/9pfs/virtio: disable hotpluggable property...")
  - Patch 2: defer explict xen_9pfs_disconnect() call from error paths of
    xen_9pfs_pdu_vmarshal() and xen_9pfs_pdu_vunmarshal().

Christian Schoenebeck (1):
  hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect

Jia Jia (1):
  hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize

 hw/9pfs/virtio-9p-device.c |  1 +
 hw/9pfs/xen-9p-backend.c   | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

-- 
2.47.3



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

end of thread, other threads:[~2026-07-18 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-18 16:50 [PATCH v2 0/2] 9p: fix guest-triggered Treaddir/ACPI eject UAF Christian Schoenebeck
2026-07-18 16:50 ` [PATCH v2 1/2] hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize Christian Schoenebeck
2026-07-18 16:50 ` [PATCH v2 2/2] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck

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.