|
|
9ae3a8 |
From b990e99b42e638a5719cf1cdc2881a6467886fcf Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 3 Dec 2014 09:17:56 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 3/3] cirrus: don't overflow CirrusVGAState->cirrus_bltbuf
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1417594676-5663-3-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.1 qemu-kvm PATCH 2/2] cirrus: don't overflow CirrusVGAState->cirrus_bltbuf
|
|
|
9ae3a8 |
Bugzilla: 1169456
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This is CVE-2014-8106.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit bf25983345ca44aec3dd92c57142be45452bd38a)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/display/cirrus_vga.c | 4 ++++
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
|
|
|
9ae3a8 |
index 9ae8313..717ecdb 100644
|
|
|
9ae3a8 |
--- a/hw/display/cirrus_vga.c
|
|
|
9ae3a8 |
+++ b/hw/display/cirrus_vga.c
|
|
|
9ae3a8 |
@@ -292,6 +292,10 @@ static bool blit_is_unsafe(struct CirrusVGAState *s)
|
|
|
9ae3a8 |
assert(s->cirrus_blt_width > 0);
|
|
|
9ae3a8 |
assert(s->cirrus_blt_height > 0);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+ if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) {
|
|
|
9ae3a8 |
+ return true;
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
|
|
|
9ae3a8 |
s->cirrus_blt_dstaddr & s->cirrus_addr_mask)) {
|
|
|
9ae3a8 |
return true;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|