Denis V. Lunev da725d0b0e block/parallels: fix access to not initialized memory in catalog_bitmap
found by valgrind.

Command: ./qemu-img convert -f parallels -O qcow2 1.hds 1.img
Invalid read of size 4
   at 0x17D0EF: parallels_co_read (parallels.c:357)
   by 0x11FEE4: bdrv_aio_rw_vector (block.c:4640)
   by 0x11FFBF: bdrv_aio_readv_em (block.c:4652)
   by 0x11F55F: bdrv_co_readv_em (block.c:4862)
   by 0x123428: bdrv_aligned_preadv (block.c:3056)
   by 0x1239FA: bdrv_co_do_preadv (block.c:3162)
   by 0x125424: bdrv_rw_co_entry (block.c:2706)
   by 0x155DD9: coroutine_trampoline (coroutine-ucontext.c:118)
   by 0x6975B6F: ??? (in /lib/x86_64-linux-gnu/libc-2.19.so)

The problem is that s->catalog_bitmap is allocated/filled as
gmalloc(s->catalog_size) thus index validity check must be
inclusive, i.e. index >= s->catalog_size is invalid.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1412759610-2257-4-git-send-email-den@openvz.org
CC: Jeff Cody <jcody@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-11-03 09:48:41 +00:00
2014-09-18 20:02:01 +01:00
2013-04-18 13:50:53 +02:00
2014-11-03 09:48:41 +00:00
2014-09-04 17:39:07 +01:00
2014-09-25 13:34:03 +01:00
2014-11-02 13:30:00 +01:00
2012-09-07 09:02:44 +03:00
2014-06-16 13:24:35 +02:00
2013-09-05 09:40:31 -05:00
2014-08-29 10:46:58 +01:00
2014-06-23 11:12:28 -04:00
2013-10-11 09:34:56 -07:00
2014-09-16 11:04:09 +02:00
2013-07-23 02:41:31 +02:00
2014-10-24 12:19:11 +01:00
2014-09-26 13:37:06 -04:00
2014-09-26 13:37:06 -04:00
2014-10-10 14:07:08 +01:00
2013-08-12 09:15:12 -05:00
2014-09-26 09:34:39 +01:00
2013-09-03 12:25:55 +02:00
2014-10-24 12:19:11 +01:00
2014-09-22 11:39:45 +01:00
2014-09-22 11:39:45 +01:00
2014-05-24 00:07:29 +04:00
2014-10-02 09:58:14 +02:00
2013-10-11 09:34:56 -07:00
2014-09-19 17:20:11 +01:00
2014-02-17 11:57:23 -05:00
2014-06-05 16:10:33 +02:00
2014-08-01 18:30:08 +01:00
2013-10-11 09:34:56 -07:00
2014-10-27 14:09:27 +00:00
2014-07-07 10:37:40 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
QEMU With E2K User Support
Readme 459 MiB
Languages
C 83.1%
C++ 6.3%
Python 3.2%
Dylan 2.8%
Shell 1.6%
Other 2.8%