On 2026/11/10 17:31, 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 <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]> Regards, Akihiko Odaki
