All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: qemu-devel@nongnu.org, xen-devel@lists.xenproject.org,
	kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Paul Durrant" <paul@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony@xenproject.org>,
	"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Jason Wang" <jasowangio@gmail.com>,
	"Hui Peng" <benquike@gmail.com>,
	"Mark Syms" <mark.syms@citrix.com>,
	"Feifan Qian" <bea1e@proton.me>,
	"David Woodhouse" <dwmw@amazon.co.uk>
Subject: Re: [PATCH v1 01/21] hw/xen: Fix partial request header handling in emulated XenStore
Date: Mon, 30 Nov 2026 13:17:02 +0000	[thread overview]
Message-ID: <87h5gy5ui9.fsf@draig.linaro.org> (raw)
In-Reply-To: <20261124232247.23169-2-dwmw2@infradead.org> (David Woodhouse's message of "Tue, 24 Nov 2026 23:22:27 +0000")

David Woodhouse <dwmw2@infradead.org> writes:

> From: David Woodhouse <dwmw@amazon.co.uk>
>
> When a XenStore request header is only partially received, QEMU copies
> XENSTORE_HEADER_SIZE bytes instead of only the remaining header bytes.
>
> Fix the length calculation to copy only the missing part of the header.
>
> Closes: https://gitlab.com/qemu-project/qemu/-/work_items/3644

Should be Resolves:

> Fixes: f3341e7b915 ("hw/xen: Add basic ring handling to xenstore")
> Fixes: CVE-2026-61403
> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> ---
>  hw/i386/kvm/xen_xenstore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
> index 0dc0edf3bfd..7d6d6d5cbb7 100644
> --- a/hw/i386/kvm/xen_xenstore.c
> +++ b/hw/i386/kvm/xen_xenstore.c
> @@ -1218,7 +1218,7 @@ static unsigned int get_req(XenXenstoreState *s)
>  
>      if (s->req_offset < XENSTORE_HEADER_SIZE) {
>          void *ptr = s->req_data + s->req_offset;
> -        unsigned int len = XENSTORE_HEADER_SIZE;
> +        unsigned int len = XENSTORE_HEADER_SIZE - s->req_offset;
>          unsigned int copylen = copy_from_ring(s, ptr, len);
>  
>          copied += copylen;

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

  parent reply	other threads:[~2026-11-30 13:17 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 23:22 [PATCH v1 00/21] hw/xen, i386/xen: security and robustness fixes David Woodhouse
2026-11-24 23:22 ` [PATCH v1 01/21] hw/xen: Fix partial request header handling in emulated XenStore David Woodhouse
2026-11-25 10:57   ` Paul Durrant
2026-11-30 13:17   ` Alex Bennée [this message]
2026-11-24 23:22 ` [PATCH v1 02/21] i386/xen: Don't resample GSI when per-vCPU upcall vector is in use David Woodhouse
2026-11-25 10:58   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 03/21] i386/xen: Free Xen vCPU timers when a vCPU is destroyed David Woodhouse
2026-11-25 11:00   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 04/21] hw/xen: Publish backend features before setting state to InitWait David Woodhouse
2026-11-25 11:05   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 05/21] hw/i386/kvm/xen_gnttab: Fix error handling in xen_be_gnttab_map_refs() David Woodhouse
2026-11-25 11:07   ` Paul Durrant
2026-11-30 13:17   ` Alex Bennée
2026-11-24 23:22 ` [PATCH v1 06/21] hw/xen: Validate grant copy segments against the page size David Woodhouse
2026-11-25 11:09   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 07/21] hw/i386/kvm/xen_evtchn: Validate PIRQ numbers in physdev operations David Woodhouse
2026-11-25 11:12   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 08/21] hw/i386/kvm/xen_evtchn: Fix off-by-one in do_remove_pci_vector() David Woodhouse
2026-11-25 11:16   ` Paul Durrant
2026-11-25 12:03     ` David Woodhouse
2026-11-25 13:31       ` Paul Durrant
2026-11-25 13:43         ` David Woodhouse
2026-11-26 10:19           ` David Woodhouse
2026-11-30 12:04         ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 09/21] i386/xen: Don't inject event on invalid port in qmp_xen_event_inject() David Woodhouse
2026-11-24 23:31   ` Philippe Mathieu-Daudé
2026-11-25 11:17   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 10/21] hw/i386/kvm/xen_evtchn: Reuse existing backend port in find_be_port() David Woodhouse
2026-11-25 11:18   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 11/21] hw/i386/kvm/xen: Don't leak gnttab handle on reset David Woodhouse
2026-11-25 11:20   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 12/21] hw/i386/kvm/xen_xenstore: Apply offset before truncation in xs_append_strings() David Woodhouse
2026-11-25 11:22   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 13/21] hw/char/xen_console: Fix buffer trim when size exceeds twice the limit David Woodhouse
2026-11-25 11:24   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 14/21] hw/9pfs/xen-9p-backend: Use validated snapshot for request iovecs David Woodhouse
2026-11-25 11:26   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 15/21] hw/9pfs/xen-9p-backend: Validate the request header size field David Woodhouse
2026-11-25 11:27   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 16/21] hw/9pfs/xen-9p-backend: Validate frontend-supplied connect parameters David Woodhouse
2026-11-25 11:29   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 17/21] hw/9pfs/xen-9p-backend: Close event channel handle on disconnect David Woodhouse
2026-11-25 11:30   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 18/21] hw/net/xen_nic: Bound the TX and RX rings' producer index David Woodhouse
2026-11-25 11:32   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 19/21] hw/xen: Bound the rep count of PIO and MMIO ioreqs David Woodhouse
2026-11-25 11:34   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 20/21] hw/i386/kvm/xen_evtchn: Hold port_lock for whole of bind_pirq_op David Woodhouse
2026-11-25 11:35   ` Paul Durrant
2026-11-24 23:22 ` [PATCH v1 21/21] hw/i386/kvm/xen_evtchn: Allow unmapping an emulated MSI PIRQ David Woodhouse
2026-11-25 11:36   ` Paul Durrant

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=87h5gy5ui9.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=anthony@xenproject.org \
    --cc=bea1e@proton.me \
    --cc=benquike@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=dwmw@amazon.co.uk \
    --cc=edgar.iglesias@gmail.com \
    --cc=jasowangio@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.syms@citrix.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.