]> git.ipfire.org Git - thirdparty/qemu.git/commit
vga: handle cirrus vbe mode wraparounds.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 10 Oct 2017 14:13:22 +0000 (16:13 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Dec 2017 19:01:53 +0000 (13:01 -0600)
commit9c7714afd7b574245c86c6bad40ecbcc2992aeec
treeeb67a7eaf4e058b20f6765f8f5f86483a2b842ce
parenta0ad811956908b699e87d8b8304910ca5979179a
vga: handle cirrus vbe mode wraparounds.

Commit "3d90c62548 vga: stop passing pointers to vga_draw_line*
functions" is incomplete.  It doesn't handle the case that the vga
rendering code tries to create a shared surface, i.e. a pixman image
backed by vga video memory.  That can not work in case the guest display
wraps from end of video memory to the start.  So force shadowing in that
case.  Also adjust the snapshot region calculation.

Can trigger with cirrus only, when programming vbe modes using the bochs
api (stdvga, also qxl and virtio-vga in vga compat mode) wrap arounds
can't happen.

Fixes: CVE-2017-13672
Fixes: 3d90c6254863693a6b13d918d2b8682e08bbc681
Cc: P J P <ppandit@redhat.com>
Reported-by: David Buchanan <d@vidbuchanan.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171010141323.14049-3-kraxel@redhat.com
(cherry picked from commit 28f77de26a4f9995458ddeb9d34bb06c0193bdc9)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/display/vga.c