]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commit
dmg: sanitize chunk length and sectorcount (CVE-2014-0145)
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 5 Mar 2015 11:23:54 +0000 (11:23 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 15:37:24 +0000 (15:37 +0000)
commitd173a0c20d7970c17fa593cf86abc1791a8a4a3a
tree6cb1e6322cb6d499b7b4841845bbb6901c27ac3c
parent8b03ba563ba3b9df220132d372b46c3bd451a548
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