thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
619821
From edb9059eb8f42f892d67df324eeb0098c05d1f4a Mon Sep 17 00:00:00 2001
619821
From: Paolo Bonzini <pbonzini@redhat.com>
619821
Date: Tue, 28 Feb 2017 12:07:54 +0100
619821
Subject: [PATCH 09/24] i386: kvmvapic: initialise imm32 variable
619821
619821
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
619821
Message-id: <20170228120754.16073-1-pbonzini@redhat.com>
619821
Patchwork-id: 74089
619821
O-Subject: [RHEL7.4 qemu-kvm PATCH] i386: kvmvapic: initialise imm32 variable
619821
Bugzilla: 1335751
619821
RH-Acked-by: David Hildenbrand <david@redhat.com>
619821
RH-Acked-by: Thomas Huth <thuth@redhat.com>
619821
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
619821
619821
When processing Task Priorty Register(TPR) access, it could leak
619821
automatic stack variable 'imm32' in patch_instruction().
619821
Initialise the variable to avoid it.
619821
619821
Reported by: Donghai Zdh <donghai.zdh@alibaba-inc.com>
619821
Cc: qemu-stable@nongnu.org
619821
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
619821
Message-Id: <1460013608-16670-1-git-send-email-ppandit@redhat.com>
619821
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
619821
(cherry picked from commit 691a02e2ce0c413236a78dee6f2651c937b09fb0)
619821
619821
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
619821
---
619821
 hw/i386/kvmvapic.c | 2 +-
619821
 1 file changed, 1 insertion(+), 1 deletion(-)
619821
619821
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
619821
index 577ae64..a5dd9dd 100644
619821
--- a/hw/i386/kvmvapic.c
619821
+++ b/hw/i386/kvmvapic.c
619821
@@ -390,7 +390,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
619821
     CPUX86State *env = &cpu->env;
619821
     VAPICHandlers *handlers;
619821
     uint8_t opcode[2];
619821
-    uint32_t imm32;
619821
+    uint32_t imm32 = 0;
619821
     target_ulong current_pc = 0;
619821
     target_ulong current_cs_base = 0;
619821
     int current_flags = 0;
619821
-- 
619821
1.8.3.1
619821