From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Gurchetan Singh" <gurchetan.singh.foss@gmail.com>
Subject: Re: [PATCH 4/4] contrib/vhost-user-gpu: reject non-32bpp cursor resources
Date: Tue, 10 Nov 2026 08:56:18 +0000 [thread overview]
Message-ID: <avLcMuTpN-4zcH8P@redhat.com> (raw)
In-Reply-To: <20261110-master-v1-4-7a0505d6c259@redhat.com>
On Tue, Nov 10, 2026 at 12:31:14PM +0400, Marc-André Lureau wrote:
> Cursor pixel data is copied as 32bpp, but the resource format is never
> checked. virgl_renderer_get_cursor_data() sizes its buffer for the
> resource's own format, while vg_virgl_update_cursor_data() copies
> 64 * 64 * 4 bytes from it: a 64x64 R8_UNORM resource gives a 4096 byte
> buffer, so 12 KiB past its end is read and handed to the display
> backend as cursor pixels.
>
> Look up the resource format and refuse anything that is not 32bpp,
> matching the virtio-gpu backends.
>
> While at it, let g_autofree release the buffer: the 64x64 check returned
> before it was freed, letting a guest grow the backend's memory with
> repeated UPDATE_CURSOR.
>
> Fixes: CVE-2026-122027
> Fixes: d52c454aadcd ("contrib: add vhost-user-gpu")
> Reported-by: Fernando Bortotti <https://gitlab.com/fernando.bortotti>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> contrib/vhost-user-gpu/vhost-user-gpu.c | 31 ++++++++++++++++++++-----------
> contrib/vhost-user-gpu/virgl.c | 25 ++++++++++++++++++-------
> contrib/vhost-user-gpu/virgl.h | 2 +-
> 3 files changed, 39 insertions(+), 19 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-11-10 8:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 8:31 [PATCH 0/4] virtio-gpu: reject non-32bpp cursor resources Marc-André Lureau
2026-11-10 8:31 ` [PATCH 1/4] virtio-gpu: make some 2d callbacks statics Marc-André Lureau
2026-11-10 8:49 ` Daniel P. Berrangé
2026-11-11 13:13 ` Akihiko Odaki
2026-11-10 8:31 ` [PATCH 2/4] virtio-gpu/gl: reject non-32bpp cursor resources Marc-André Lureau
2026-11-10 8:53 ` Daniel P. Berrangé
2026-11-11 13:19 ` Akihiko Odaki
2026-11-10 8:31 ` [PATCH 3/4] virtio-gpu/rutabaga: " Marc-André Lureau
2026-11-10 8:54 ` Daniel P. Berrangé
2026-11-11 13:21 ` Akihiko Odaki
2026-11-10 8:31 ` [PATCH 4/4] contrib/vhost-user-gpu: " Marc-André Lureau
2026-11-10 8:56 ` Daniel P. Berrangé [this message]
2026-11-11 13:29 ` Akihiko Odaki
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=avLcMuTpN-4zcH8P@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=dmitry.osipenko@collabora.com \
--cc=gurchetan.singh.foss@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
/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.