Blame 0006-i386-kvmvapic-initialise-imm32-variable.patch

f0208c
From: Prasad J Pandit <pjp@fedoraproject.org>
f0208c
Date: Thu, 7 Apr 2016 12:50:08 +0530
f0208c
Subject: [PATCH] i386: kvmvapic: initialise imm32 variable
f0208c
f0208c
When processing Task Priorty Register(TPR) access, it could leak
f0208c
automatic stack variable 'imm32' in patch_instruction().
f0208c
Initialise the variable to avoid it.
f0208c
f0208c
Reported by: Donghai Zdh <donghai.zdh@alibaba-inc.com>
f0208c
Cc: qemu-stable@nongnu.org
f0208c
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
f0208c
Message-Id: <1460013608-16670-1-git-send-email-ppandit@redhat.com>
f0208c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
f0208c
f0208c
(cherry picked from commit 691a02e2ce0c413236a78dee6f2651c937b09fb0)
f0208c
---
f0208c
 hw/i386/kvmvapic.c | 2 +-
f0208c
 1 file changed, 1 insertion(+), 1 deletion(-)
f0208c
f0208c
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
f0208c
index c69f374..ff1e31a 100644
f0208c
--- a/hw/i386/kvmvapic.c
f0208c
+++ b/hw/i386/kvmvapic.c
f0208c
@@ -394,7 +394,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
f0208c
     CPUX86State *env = &cpu->env;
f0208c
     VAPICHandlers *handlers;
f0208c
     uint8_t opcode[2];
f0208c
-    uint32_t imm32;
f0208c
+    uint32_t imm32 = 0;
f0208c
     target_ulong current_pc = 0;
f0208c
     target_ulong current_cs_base = 0;
f0208c
     int current_flags = 0;