[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] vt82c686: avoid out-of-bounds read

From: zhanghailiang
Subject: Re: [Qemu-trivial] [PATCH] vt82c686: avoid out-of-bounds read
Date: Wed, 10 Dec 2014 17:31:17 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Hi paolo,

Will this change affects the migration?
I noticed that there is a member 'SuperIOConfig superio_conf' in VT82C686BState.

vt82c686 seems only to be used in mips64el target, Do we support migration for 
mips target?


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 <address@hidden>
  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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]