]> Git Repo - qemu.git/commit - tests/qemu-iotests/076
parallels: Fix catalog size integer overflow (CVE-2014-0143)
authorKevin Wolf <[email protected]>
Wed, 26 Mar 2014 12:06:08 +0000 (13:06 +0100)
committerStefan Hajnoczi <[email protected]>
Tue, 1 Apr 2014 13:22:35 +0000 (15:22 +0200)
commitafbcc40bee4ef51731102d7d4b499ee12fc182e1
tree35f637ffc51bffdf6a01dd6478ccae2a0a2bcb1e
parent5dae6e30c531feb31eed99f9039b52bf70832ce3
parallels: Fix catalog size integer overflow (CVE-2014-0143)

The first test case would cause a huge memory allocation, leading to a
qemu abort; the second one to a too small malloc() for the catalog
(smaller than s->catalog_size), which causes a read-only out-of-bounds
array access and on big endian hosts an endianess conversion for an
undefined memory area.

The sample image used here is not an original Parallels image. It was
created using an hexeditor on the basis of the struct that qemu uses.
Good enough for trying to crash the driver, but not for ensuring
compatibility.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
block/parallels.c
tests/qemu-iotests/076 [new file with mode: 0755]
tests/qemu-iotests/076.out [new file with mode: 0644]
tests/qemu-iotests/common
tests/qemu-iotests/group
tests/qemu-iotests/sample_images/fake.parallels.bz2 [new file with mode: 0644]
This page took 0.027719 seconds and 4 git commands to generate.