[PATCH 0/2] virtio-gpu: fix overflow check when allocating 2d image

Marc-André Lureau posted 2 patches 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260311-cve-v1-0-f72b4c7c1ab2@redhat.com
Maintainers: "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>
hw/display/virtio-gpu.c | 43 ++++++++++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 13 deletions(-)
[PATCH 0/2] virtio-gpu: fix overflow check when allocating 2d image
Posted by Marc-André Lureau 4 weeks ago
The calc_image_hostmem() comment says pixman_image_create_bits() checks for
overflow. However, this relied on the facts that "bits" was NULL and it
performed it when it was introduced. Since commit 9462ff4695aa, the "bits"
argument can be provided and the check is no longer applied. This can lead to
OOB access.

Thanks Trend Micro's Zero Day Initiative for identifying the vulnerability.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
Marc-André Lureau (2):
      virtio-gpu: fix overflow check when allocating 2d image
      virtio-gpu: use computed rowstride instead of deriving it from hostmem

 hw/display/virtio-gpu.c | 43 ++++++++++++++++++++++++++++++-------------
 1 file changed, 30 insertions(+), 13 deletions(-)
---
base-commit: ae56950eac7b61b1abf42003329ee0f3ce111711
change-id: 20260311-cve-af8a6cabf312

Best regards,
-- 
Marc-André Lureau <marcandre.lureau@redhat.com>


Re: [PATCH 0/2] virtio-gpu: fix overflow check when allocating 2d image
Posted by Akihiko Odaki 3 weeks, 6 days ago
On 2026/03/11 6:26, Marc-André Lureau wrote:
> The calc_image_hostmem() comment says pixman_image_create_bits() checks for
> overflow. However, this relied on the facts that "bits" was NULL and it
> performed it when it was introduced. Since commit 9462ff4695aa, the "bits"
> argument can be provided and the check is no longer applied. This can lead to
> OOB access.
> 
> Thanks Trend Micro's Zero Day Initiative for identifying the vulnerability.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

For the whole series,

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>