]> xenbits.xensource.com Git - qemu-xen-unstable.git/commit
cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 22 Feb 2017 16:25:19 +0000 (16:25 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 22 Feb 2017 16:25:19 +0000 (16:25 +0000)
commit83256b312acfddda34d96e9bba30e93387481091
tree4145790333c9fa14d0aaa81e6b7616d6db7b65ab
parentc4018bc4d638918b3f8fb49dd3b379abb5658ee1
cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo

CIRRUS_BLTMODE_MEMSYSSRC blits do NOT check blit destination
and blit width, at all.  Oops.  Fix it.

Security impact: high.

The missing blit destination check allows to write to host memory.
Basically same as CVE-2014-8106 for the other blit variants.

The missing blit width check allows to overflow cirrus_bltbuf,
with the attractive target cirrus_srcptr (current cirrus_bltbuf write
position) being located right after cirrus_bltbuf in CirrusVGAState.

Due to cirrus emulation writing cirrus_bltbuf bytewise the attacker
hasn't full control over cirrus_srcptr though, only one byte can be
changed.  Once the first byte has been modified further writes land
elsewhere.

[ This is CVE-2017-2620 / XSA-209  - Ian Jackson ]

Fixed compilation by removing extra parameter to blit_is_unsafe. -iwj

Reported-by: Gerd Hoffmann <ghoffman@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/cirrus_vga.c