]> xenbits.xensource.com Git - qemu-upstream-4.2-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 18:17:04 +0000 (18:17 +0000)
commite49807b61c8152b0730a310a3d771ac253e750aa
tree39e708c1bbdb318a614a3f0f0561eac41f316fb6
parent4535b0a69314be835ef8c6d07df0403b254f3c9e
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