]> xenbits.xensource.com Git - people/andrewcoop/qemu-traditional.git/commit
vga: fix banked access bounds checking (CVE-2016-3710)
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 26 Apr 2016 06:49:10 +0000 (08:49 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 May 2016 17:50:57 +0000 (18:50 +0100)
commit1c377de2b33388c2cd11c355cd4bb2be83d7c51c
tree60f3b0447460ec4b3c0456ace115ab2b2c7b3150
parent21f6526d1da331611ac5fe12967549d1a04e149b
vga: fix banked access bounds checking (CVE-2016-3710)

vga allows banked access to video memory using the window at 0xa00000
and it supports a different access modes with different address
calculations.

The VBE bochs extentions support banked access too, using the
VBE_DISPI_INDEX_BANK register.  The code tries to take the different
address calculations into account and applies different limits to
VBE_DISPI_INDEX_BANK depending on the current access mode.

Which is probably effective in stopping misprogramming by accident.
But from a security point of view completely useless as an attacker
can easily change access modes after setting the bank register.

Drop the bogus check, add range checks to vga_mem_{readb,writeb}
instead.

Fixes: CVE-2016-3710
Reported-by: Qinghao Tang <luodalongde@gmail.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