]> git.ipfire.org Git - thirdparty/qemu.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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Jul 2014 21:18:11 +0000 (16:18 -0500)
commit37173f54b7925f02045a93c081deabca1b8a6abd
tree34e1172eb688912db8f4d2af84cc214b6d17d02c
parent76d1eddbe533d828eb866c36b7b13837986c7fc3
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>
(cherry picked from commit 63fa06dc978f3669dbfd9443b33cde9e2a7f4b41)

Conflicts:
block/vdi.c

*modified to retain 1.7's usage of logout() over error_setg()

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/vdi.c