bochs: Check extent_size header field (CVE-2014-0142)
authorKevin Wolf <kwolf@redhat.com>
Wed, 26 Mar 2014 12:05:34 +0000 (13:05 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Apr 2014 11:59:47 +0000 (13:59 +0200)
commit8e53abbc20d08ae3ec30c2054e1161314ad9501d
treebddf225073fc61d129d292b9300e40d9526037fa
parente3737b820b45e54b059656dc3f914f895ac7a88b
bochs: Check extent_size header field (CVE-2014-0142)

This fixes two possible division by zero crashes: In bochs_open() and in
seek_to_sector().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/bochs.c
tests/qemu-iotests/078
tests/qemu-iotests/078.out