i386: kvmvapic: initialise imm32 variable
PATCH 1/1 i386: kvmvapic: initialise imm32 variable
From: Prasad J Pandit <[email protected]>
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 <[email protected]>
Signed-off-by Prasad J Pandit <[email protected]>
--- hw/i386/kvmvapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/kvmvapic.c +1 -1
@@ -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 ;
Signature · 1 line
2.5.5
Paolo Bonzini
AppliedQuoted 19 lines · P J P
From: Prasad J Pandit <[email protected]>
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 <[email protected]>
Signed-off-by Prasad J Pandit <[email protected]>--- hw/i386/kvmvapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/i386/kvmvapic.c +0
-0
hw/i386/kvmvapic.c static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) · line 400
Quoted 8 lines
hw/i386/kvmvapic.c +1
-1@@ -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