]> xenbits.xensource.com Git - qemu-xen.git/commit
qcow1: Validate image size (CVE-2014-0223)
authorKevin Wolf <kwolf@redhat.com>
Thu, 8 May 2014 11:08:20 +0000 (13:08 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 21 Jul 2014 03:32:10 +0000 (22:32 -0500)
commita4b73ed3f37df05f1fd13418f18feb026008301c
treeb1bd09f7746e8f679218a853803ab1a665557271
parenta3967c74de398149d722deac5c26634a5e9ddbe2
qcow1: Validate image size (CVE-2014-0223)

A huge image size could cause s->l1_size to overflow. Make sure that
images never require a L1 table larger than what fits in s->l1_size.

This cannot only cause unbounded allocations, but also the allocation of
a too small L1 table, resulting in out-of-bounds array accesses (both
reads and writes).

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 46485de0cb357b57373e1ca895adedf1f3ed46ec)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow.c
tests/qemu-iotests/092
tests/qemu-iotests/092.out