]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commit
qcow1: Validate image size (CVE-2014-0223)
authorKevin Wolf <kwolf@redhat.com>
Thu, 5 Mar 2015 11:02:45 +0000 (11:02 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 18:17:01 +0000 (18:17 +0000)
commit8820cc3906ac8fe3438e13d0ea66f4918c1286ba
tree494656fea34381a6149e46f7563f5d8414469714
parent0d217199cbac67d2f1f4102a944f96bfcfabae15
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