[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 16/21] hw/9pfs/xen-9p-backend: Validate frontend-supplied connect parameters
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Wed, 25 Nov 2026 11:29:45 +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:44:50 +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>
The ring order is read from the guest-shared interface page into a
signed int, so a large value became negative and bypassed the
MAX_RING_ORDER check, leading to an undefined shift. Keep it unsigned.
Treat any negative return from the event channel bind as failure, not
just -1, and fail the connect if the frontend provides no 'tag' key
rather than passing NULL into the fsdev layer.
Fixes: b37eeb020123 ("xen/9pfs: introduce Xen 9pfs backend")
Reported-by: Hui Peng <benquike@xxxxxxxxx>
Closes: https://gitlab.com/qemu-project/qemu/-/work_items/4523
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
hw/9pfs/xen-9p-backend.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|