]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
vdi: add bounds checks for blocks_in_image and disk_size header fields (CVE-2014...
authorJeff Cody <jcody@redhat.com>
Fri, 28 Mar 2014 15:42:24 +0000 (11:42 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Apr 2014 12:06:31 +0000 (14:06 +0200)
commit63fa06dc978f3669dbfd9443b33cde9e2a7f4b41
treee3d996d1d067687d9a1a9c2a93e67d827b9e101c
parent5e71dfad763d67bb64be79e20e93411c0c30ad25
vdi: add bounds checks for blocks_in_image and disk_size header fields (CVE-2014-0144)

The maximum blocks_in_image is 0xffffffff / 4, which also limits the
maximum disk_size for a VDI image to 1024TB.  Note that this is the maximum
size that QEMU will currently support with this driver, not necessarily the
maximum size allowed by the image format.

This also fixes an incorrect error message, a bug introduced by commit
5b7aa9b56d1bfc79916262f380c3fc7961becb50 (Reported by Stefan Weil)

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/vdi.c