]> xenbits.xensource.com Git - qemu-xen-unstable.git/commit
vga: make sure vga register setup for vbe stays intact (CVE-2016-3712).
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 26 Apr 2016 12:48:06 +0000 (14:48 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 May 2016 17:51:05 +0000 (18:51 +0100)
commit1f9da382d49765ce9f7e4d301fe1e51945b29218
tree5d32ea529d39633efc0e9b154e1db0465ce2b51f
parent0dcc0526836cc560ff849e35d66da23147c462b5
vga: make sure vga register setup for vbe stays intact (CVE-2016-3712).

Call vbe_update_vgaregs() when the guest touches GFX, SEQ or CRT
registers, to make sure the vga registers will always have the
values needed by vbe mode.  This makes sure the sanity checks
applied by vbe_fixup_regs() are effective.

Without this guests can muck with shift_control, can turn on planar
vga modes or text mode emulation while VBE is active, making qemu
take code paths meant for CGA compatibility, but with the very
large display widths and heigts settable using VBE registers.

Which is good for one or another buffer overflow.  Not that
critical as they typically read overflows happening somewhere
in the display code.  So guests can DoS by crashing qemu with a
segfault, but it is probably not possible to break out of the VM.

Fixes: CVE-2016-3712
Reported-by: Zuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
Reported-by: P J P <ppandit@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
[Backport to qemu-xen-tradition]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
hw/vga.c