[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 07/21] hw/i386/kvm/xen_evtchn: Validate PIRQ numbers in physdev operations
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Wed, 25 Nov 2026 11:12:40 +0000
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20260707 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:In-Reply-To:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID:From"
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, "Edgar E . Iglesias" <edgar.iglesias@xxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, Jason Wang <jasowangio@xxxxxxxxx>, Hui Peng <benquike@xxxxxxxxx>, Mark Syms <mark.syms@xxxxxxxxxx>, Feifan Qian <bea1e@xxxxxxxxx>, David Woodhouse <dwmw@xxxxxxxxxxxx>
- Delivery-date: Wed, 25 Nov 2026 11:12:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 24/11/2026 16:22, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
xen_physdev_eoi_pirq() and xen_physdev_query_pirq() used the given PIRQ
number to index the PIRQ tables without checking it against nr_pirqs.
Reject out-of-range values, and reject PIRQ 0 in bind_pirq and
map_pirq. PIRQs 0-15 are reserved for the initial domain's identity
claims of the legacy ISA IRQs — the allocators, Xen's and ours alike,
never hand them out — and an HVM guest has no such claim. QEMU's
gsi_pirq[] and MSI target lookups both treat 0 as "no PIRQ", so a
guest-mapped pirq 0 could never deliver anything; better to refuse it
than to create a silently dead mapping.
Fixes: CVE-2026-123070
Fixes: 799c23548f0d ("i386/xen: Implement HYPERVISOR_physdev_op")
Reported-by: bubblehuntr <https://gitlab.com/bubblehuntr>
Reported-by: Hui Peng <benquike@xxxxxxxxx>
Closes: https://gitlab.com/qemu-project/qemu/-/work_items/4525
Closes: https://gitlab.com/qemu-project/qemu/-/work_items/3639
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
hw/i386/kvm/xen_evtchn.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|