From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Greg Kurz <groug@kaod.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Anthony PERARD <anthony@xenproject.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Jia Jia <physicalmtea@gmail.com>
Subject: Re: [PATCH v3 0/2] 9p: fix guest-triggered Treaddir/ACPI eject UAF
Date: Fri, 24 Jul 2026 09:35:22 +0200 [thread overview]
Message-ID: <3960698.kQq0lBPeGt@weasel> (raw)
In-Reply-To: <cover.1784809978.git.qemu_oss@crudebyte.com>
On Thursday, 23 July 2026 14:43:24 CEST Christian Schoenebeck wrote:
> 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.
>
> v3:
> - Patch 2: set s->transport = NULL in v9fs_device_unrealize_common()
> and make the idempotent check just guard the v9fs_reset(s) and
> v9fs_device_unrealize_common(s) calls in xen_9pfs_disconnect() to
> prevent a NULL pointer dereference.
>
> v2: [
> https://lore.kernel.org/qemu-devel/cover.1784392605.git.qemu_oss@crudebyte.
> com/ ] - 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/9p.c | 1 +
> hw/9pfs/virtio-9p-device.c | 1 +
> hw/9pfs/xen-9p-backend.c | 17 +++++++++++++++--
> 3 files changed, 17 insertions(+), 2 deletions(-)
Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next
Thanks!
/Christian
prev parent reply other threads:[~2026-07-24 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 12:43 [PATCH v3 0/2] 9p: fix guest-triggered Treaddir/ACPI eject UAF Christian Schoenebeck
2026-07-23 12:43 ` [PATCH v3 2/2] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck
2026-07-24 7:49 ` Philippe Mathieu-Daudé
2026-07-24 9:09 ` Christian Schoenebeck
2026-07-23 12:43 ` [PATCH v3 1/2] hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize Christian Schoenebeck
2026-07-24 7:45 ` Philippe Mathieu-Daudé
2026-07-24 9:26 ` Christian Schoenebeck
2026-07-24 7:35 ` Christian Schoenebeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3960698.kQq0lBPeGt@weasel \
--to=qemu_oss@crudebyte.com \
--cc=anthony@xenproject.org \
--cc=edgar.iglesias@gmail.com \
--cc=groug@kaod.org \
--cc=physicalmtea@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=sstabellini@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.