From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao5bX-0000Oq-TZ for qemu-devel@nongnu.org; Thu, 07 Apr 2016 04:47:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao5bT-00010b-AN for qemu-devel@nongnu.org; Thu, 07 Apr 2016 04:47:55 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao5bS-00010Q-QK for qemu-devel@nongnu.org; Thu, 07 Apr 2016 04:47:50 -0400 Received: by mail-wm0-x242.google.com with SMTP id l6so2409600wml.3 for ; Thu, 07 Apr 2016 01:47:50 -0700 (PDT) Sender: Paolo Bonzini References: <1460013608-16670-1-git-send-email-ppandit@redhat.com> From: Paolo Bonzini Message-ID: <57061EB4.8080402@redhat.com> Date: Thu, 7 Apr 2016 10:47:48 +0200 MIME-Version: 1.0 In-Reply-To: <1460013608-16670-1-git-send-email-ppandit@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] i386: kvmvapic: initialise imm32 variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: P J P , Qemu Developers Cc: Donghai Zdh , Prasad J Pandit On 07/04/2016 09:20, P J P wrote: > 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 > > Signed-off-by: Prasad J Pandit > --- > 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; > Queued for 2.6, thanks. Paolo