Received: from eggs.gnu.org ([2001:4830:134:3::10]:41641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrk2-0003tg-VW for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWrjy-0005sg-Vx for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:45 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrjy-0005sU-N2 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:42 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u78L5TOD117199 for ; Mon, 8 Aug 2016 17:05:42 -0400 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 24ncdc0ka2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 08 Aug 2016 17:05:42 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Aug 2016 15:05:41 -0600 From: Michael Roth Date: Mon, 8 Aug 2016 16:03:32 -0500 In-Reply-To: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> Message-Id: <1470690267-31454-2-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 01/56] i386: kvmvapic: initialise imm32 variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Prasad J Pandit , Paolo Bonzini From: Prasad J Pandit When processing Task Priorty Register(TPR) access, it could leak automatic stack variable 'imm32' in patch_instruction(). Initialise the variable to avoid it. Reported by: Donghai Zdh Cc: qemu-stable@nongnu.org Signed-off-by: Prasad J Pandit Message-Id: <1460013608-16670-1-git-send-email-ppandit@redhat.com> Signed-off-by: Paolo Bonzini (cherry picked from commit 691a02e2ce0c413236a78dee6f2651c937b09fb0) Signed-off-by: Michael Roth --- hw/i386/kvmvapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index c69f374..ff1e31a 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -394,7 +394,7 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) CPUX86State *env = &cpu->env; VAPICHandlers *handlers; uint8_t opcode[2]; - uint32_t imm32; + uint32_t imm32 = 0; target_ulong current_pc = 0; target_ulong current_cs_base = 0; int current_flags = 0; -- 1.9.1