]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
vga: fix banked access bounds checking (CVE-2016-3710)
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 4 May 2016 16:40:58 +0000 (17:40 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 10 May 2016 10:51:32 +0000 (11:51 +0100)
commitcae20a4a923c292158080bf538d7583fc2e1b455
treebadd82f991290d52846b2dadb30ed377cea90f9a
parent10c1b763c26feb645627a1639e722515f3e1e876
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.

upstream-commit-id: 3bf1817079bb0d80c0d8a86a7c7dd0bfe90eb82e

Fixes: CVE-2016-3710
Reported-by: Qinghao Tang <luodalongde@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
hw/vga.c