]> xenbits.xensource.com Git - qemu-xen.git/commit
vga: stop passing pointers to vga_draw_line* functions
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 28 Aug 2017 12:29:06 +0000 (14:29 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 22 Sep 2017 23:11:23 +0000 (18:11 -0500)
commit2965be1f00d88972650b6dc4bdc28976d2c66043
tree096a6827c8fc258be12b037895739cc78b85181f
parentd6f7f3b0cf4b6c5e7cdff9dfa6d20545e1051375
vga: stop passing pointers to vga_draw_line* functions

Instead pass around the address (aka offset into vga memory).
Add vga_read_* helper functions which apply vbe_size_mask to
the address, to make sure the address stays within the valid
range, similar to the cirrus blitter fixes (commits ffaf857778
and 026aeffcb4).

Impact:  DoS for privileged guest users.  qemu crashes with
a segfault, when hitting the guard page after vga memory
allocation, while reading vga memory for display updates.

Fixes: CVE-2017-13672
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: 20170828122906.18993-1-kraxel@redhat.com
(cherry picked from commit 3d90c6254863693a6b13d918d2b8682e08bbc681)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/display/vga-helpers.h
hw/display/vga.c
hw/display/vga_int.h