All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, peter.huangpeng@huawei.com
Subject: Re: [Qemu-devel] [PATCH] vt82c686: avoid out-of-bounds read
Date: Thu, 11 Dec 2014 16:35:31 +0800	[thread overview]
Message-ID: <54895753.20309@huawei.com> (raw)
In-Reply-To: <1418203056-5365-1-git-send-email-pbonzini@redhat.com>

On 2014/12/10 17:17, Paolo Bonzini wrote:
> superio_ioport_readb can read the 256th element of the array.
> Coverity reports an out-of-bounds write in superio_ioport_writeb,
> but it does not show the corresponding out-of-bounds read
> because it cannot prove that it can happen.  Fix the root
> cause of the problem (zhanghailang's patch instead fixes
> the logic in superio_ioport_writeb).
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/isa/vt82c686.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> index e0c235c..a43e26d 100644
> --- a/hw/isa/vt82c686.c
> +++ b/hw/isa/vt82c686.c
> @@ -36,7 +36,7 @@
>
>   typedef struct SuperIOConfig
>   {
> -    uint8_t config[0xff];
> +    uint8_t config[0x100];
>       uint8_t index;
>       uint8_t data;
>   } SuperIOConfig;
>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>

  parent reply	other threads:[~2014-12-11  8:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  9:17 [Qemu-devel] [PATCH] vt82c686: avoid out-of-bounds read Paolo Bonzini
2014-12-10  9:31 ` zhanghailiang
2014-12-10  9:52   ` Paolo Bonzini
2014-12-11  8:35 ` zhanghailiang [this message]
2014-12-11 17:55 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-12-11 19:05   ` Paolo Bonzini
2015-01-12  8:49 ` Michael Tokarev

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=54895753.20309@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.