]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commit
qcow1: Validate image size (CVE-2014-0223)
authorKevin Wolf <kwolf@redhat.com>
Thu, 5 Mar 2015 11:02:27 +0000 (11:02 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 15:37:20 +0000 (15:37 +0000)
commitb0547854f6b90670b1ab8ce9a9bb1f7500361919
tree3339b6a91c26e863ee0b662d3aa758eedcea64fe
parent7e6a078090e08ad0aa882097468953122e319d00
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