]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/extra/0011-vga-fix-display-update-region-calculation-split-scre.patch
bump version to 2.9.1-3
[pve-qemu.git] / debian / patches / extra / 0011-vga-fix-display-update-region-calculation-split-scre.patch
CommitLineData
c53dfb57 1From b8aa853672ab9e94821a43b6cb2a51d24cb2be8c Mon Sep 17 00:00:00 2001
ddbcf45e
WB
2From: Gerd Hoffmann <kraxel@redhat.com>
3Date: Fri, 1 Sep 2017 14:57:38 +0200
c53dfb57 4Subject: [PATCH 11/23] vga: fix display update region calculation (split
ddbcf45e
WB
5 screen)
6
7vga display update mis-calculated the region for the dirty bitmap
8snapshot in case split screen mode is used. This can trigger an
9assert in cpu_physical_memory_snapshot_get_dirty().
10
11Impact: DoS for privileged guest users.
12
13Fixes: CVE-2017-13673
14Fixes: fec5e8c92becad223df9d972770522f64aafdb72
15Cc: P J P <ppandit@redhat.com>
16Reported-by: David Buchanan <d@vidbuchanan.co.uk>
17Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
18Message-id: 20170828123307.15392-1-kraxel@redhat.com
19---
20 hw/display/vga.c | 10 ++++++++--
21 1 file changed, 8 insertions(+), 2 deletions(-)
22
23diff --git a/hw/display/vga.c b/hw/display/vga.c
24index dcc95f88e2..533d8d7895 100644
25--- a/hw/display/vga.c
26+++ b/hw/display/vga.c
27@@ -1628,9 +1628,15 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
28 y1 = 0;
29
30 if (!full_update) {
31+ ram_addr_t region_start = addr1;
32+ ram_addr_t region_end = addr1 + line_offset * height;
33 vga_sync_dirty_bitmap(s);
34- snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
35- line_offset * height,
36+ if (s->line_compare < height) {
37+ /* split screen mode */
38+ region_start = 0;
39+ }
40+ snap = memory_region_snapshot_and_clear_dirty(&s->vram, region_start,
41+ region_end - region_start,
42 DIRTY_MEMORY_VGA);
43 }
44
45--
462.11.0
47