[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 13/21] hw/char/xen_console: Fix buffer trim when size exceeds twice the limit
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Wed, 25 Nov 2026 11:24:34 +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:24:40 +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>
In buffer_append() we handle a full buffer by discarding bytes from the
*middle*, preserving the oldest and the newest data. When the overflow
exceeded the max capacity (a limit set by the guest), the memmove()
destination was miscalculated and ended up before the start of the
buffer. In that case there is no older data worth preserving anyway;
just keep the newest max_capacity bytes.
Fixes: CVE-2026-123071
Fixes: e57dd20bb706 ("xen: add console backend driver.")
Reported-by: Giovanni Vignone <https://gitlab.com/gio24>
Reported-by: Hui Peng <benquike@xxxxxxxxx>
Closes: https://gitlab.com/qemu-project/qemu/-/work_items/4191
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
hw/char/xen_console.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|