[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 19/21] hw/xen: Bound the rep count of PIO and MMIO ioreqs



On 24/11/2026 16:22, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>

cpu_ioreq_pio() and cpu_ioreq_move() iterated req->count times with no
upper bound, so a count of UINT32_MAX kept the vCPU handler thread
spinning through four billion iterations. Xen's instruction emulator
clips a rep batch to at most 4096 repetitions (hvmemul_virtual_to_linear()
and hvmemul_linear_to_phys() both apply that bound before an ioreq is
sent), so reject larger counts as malformed, and reject a zero size, as
the other framing checks here already do.

Fixes: 9ce94e7c8a99 ("xen: Initialize event channels and io rings")
Reported-by: Feifan Qian <bea1e@xxxxxxxxx>
Closes: https://gitlab.com/qemu-project/qemu/-/work_items/3756
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
  hw/xen/xen-hvm-common.c | 19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)

Reviewed-by: Paul Durrant <paul@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.