Skip to content

virtio-gpu: fix overflow check when allocating 2d image

Marc-André Lureau qemu-devel 1 version In review

Get series with b4
b4 am [email protected] change-id 20260311-cve-af8a6cabf312

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio-gpu: fix overflow check when allocating 2d imagehw/display/virtio-gpu.c+25 -110 replies
2/2virtio-gpu: use computed rowstride instead of deriving it from hostmemhw/display/virtio-gpu.c+10 -70 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAkihiko Odaki
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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.

---
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,

Signature · 1 line
Marc-André Lureau <[email protected]>