All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: P J P <ppandit@redhat.com>, Qemu Developers <qemu-devel@nongnu.org>
Cc: Donghai Zdh <donghai.zdh@alibaba-inc.com>,
	Prasad J Pandit <pjp@fedoraproject.org>
Subject: Re: [Qemu-devel] [PATCH] i386: kvmvapic: initialise imm32 variable
Date: Thu, 7 Apr 2016 10:47:48 +0200	[thread overview]
Message-ID: <57061EB4.8080402@redhat.com> (raw)
In-Reply-To: <1460013608-16670-1-git-send-email-ppandit@redhat.com>



On 07/04/2016 09:20, P J P wrote:
> From: Prasad J Pandit <pjp@fedoraproject.org>
> 
> 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 <donghai.zdh@alibaba-inc.com>
> 
> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
> ---
>  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

      reply	other threads:[~2016-04-07  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  7:20 [Qemu-devel] [PATCH] i386: kvmvapic: initialise imm32 variable P J P
2016-04-07  8:47 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57061EB4.8080402@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=donghai.zdh@alibaba-inc.com \
    --cc=pjp@fedoraproject.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.