]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
qcow2: Fix L1 allocation size in qcow2_snapshot_load_tmp() (CVE-2014-0145)
authorKevin Wolf <kwolf@redhat.com>
Wed, 26 Mar 2014 12:06:05 +0000 (13:06 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Jul 2014 21:18:14 +0000 (16:18 -0500)
commitd99c4e2d857fbd5e95bf61971d59eb10499289c0
tree59ca375f06c85be101a230b55499ef07dfed341e
parent641c3ec44252f077100269e631a3583046848f18
qcow2: Fix L1 allocation size in qcow2_snapshot_load_tmp() (CVE-2014-0145)

For the L1 table to loaded for an internal snapshot, the code allocated
only enough memory to hold the currently active L1 table. If the
snapshot's L1 table is actually larger than the current one, this leads
to a buffer overflow.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit c05e4667be91b46ab42b5a11babf8e84d476cc6b)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow2-snapshot.c
tests/qemu-iotests/029
tests/qemu-iotests/029.out