Update to v2.8.0, including integration of SLE qemu package so we are "Factory First" again for SLE qemu. Includes some spec file tweaks/cleanups as well. A number of post v2.8.0 security fixes are also included. OBS-URL: https://build.opensuse.org/request/show/461715 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=329
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From bd4f41a27f8e53e8c8bf958f44afda915b8fec5c Mon Sep 17 00:00:00 2001
|
|
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Date: Wed, 8 Feb 2017 11:18:36 +0100
|
|
Subject: [PATCH] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo
|
|
(CVE-2017-2620)
|
|
|
|
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.
|
|
|
|
Cc: qemu-stable@nongnu.org
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
(cherry picked from commit 92f2b88cea48c6aeba8de568a45f2ed958f3c298)
|
|
[BR: BSC#1024972]
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
hw/display/cirrus_vga.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
|
|
index d214ef74f9..8bf057de82 100644
|
|
--- a/hw/display/cirrus_vga.c
|
|
+++ b/hw/display/cirrus_vga.c
|
|
@@ -899,6 +899,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
|
|
{
|
|
int w;
|
|
|
|
+ if (blit_is_unsafe(s, true)) {
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;
|
|
s->cirrus_srcptr = &s->cirrus_bltbuf[0];
|
|
s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];
|
|
@@ -924,6 +928,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
|
|
}
|
|
s->cirrus_srccounter = s->cirrus_blt_srcpitch * s->cirrus_blt_height;
|
|
}
|
|
+
|
|
+ /* the blit_is_unsafe call above should catch this */
|
|
+ assert(s->cirrus_blt_srcpitch <= CIRRUS_BLTBUFSIZE);
|
|
+
|
|
s->cirrus_srcptr = s->cirrus_bltbuf;
|
|
s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;
|
|
cirrus_update_memory_access(s);
|