Skip to content
  • Gerd Hoffmann's avatar
    vga: make sure vga register setup for vbe stays intact (CVE-2016-3712). · fd3c136b
    Gerd Hoffmann authored
    
    
    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: default avatarZuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
    Reported-by: default avatarP J P <ppandit@redhat.com>
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    fd3c136b