]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
qcow1: Validate image size (CVE-2014-0223)
authorKevin Wolf <kwolf@redhat.com>
Thu, 5 Mar 2015 11:02:39 +0000 (11:02 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 17:12:19 +0000 (17:12 +0000)
commit62692e12010c1e7e387e80f1b744d4ae122f66cf
treee88805e8a1bb1568a1c9d2bdde3c958341b1c968
parent2247bc8c1b1234cc6a9c0c024b4fee1dd4e10e3a
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>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
block/qcow.c