Commit 9569f5cb authored by Mauro Matteo Cascella's avatar Mauro Matteo Cascella Committed by Gerd Hoffmann
Browse files

display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)

Avoid fetching 'width' and 'height' a second time to prevent possible
race condition. Refer to security advisory

 for more information.

Fixes: CVE-2021-4207
Signed-off-by: Mauro Matteo Cascella's avatarMauro Matteo Cascella <>
Reviewed-by: Marc-André Lureau's avatarMarc-André Lureau <>
Message-Id: <>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <>
parent 95a3fcc7
......@@ -266,7 +266,7 @@ static QEMUCursor *qxl_cursor(PCIQXLDevice *qxl, QXLCursor *cursor,
size = sizeof(uint32_t) * cursor->header.width * cursor->header.height;
size = sizeof(uint32_t) * c->width * c->height;
qxl_unpack_chunks(c->data, size, qxl, &cursor->chunk, group_id);
if (qxl->debug > 2) {
cursor_print_ascii_art(c, "qxl/alpha");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment