]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
dmg: sanitize chunk length and sectorcount (CVE-2014-0145)
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 5 Mar 2015 11:27:26 +0000 (11:27 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 17:24:49 +0000 (17:24 +0000)
commitab689a89ec47b2e1c964c57bea7da68f8ddf89fd
tree08217037d5b175e03c5bfa8d5d7b6412f2106c5b
parent1e005e117cc672fea8cca3c38c71bd60f5ee4cfb
dmg: sanitize chunk length and sectorcount (CVE-2014-0145)

Chunk length and sectorcount are used for decompression buffers as well
as the bdrv_pread() count argument.  Ensure that they have reasonable
values so neither memory allocation nor conversion from uint64_t to int
will cause problems.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
block/dmg.c